Commit d9f7fc6b authored by Tom Rini's avatar Tom Rini

ppc32: Update MPC8xx code to quasi functional

From: Dan Malek <dan@embeddededge.com>
Signed-off-by: default avatarRobert P. J. Day <rpjday@mindspring.com>
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
parent 0b3e8d29
...@@ -74,37 +74,6 @@ config ENET_BIG_BUFFERS ...@@ -74,37 +74,6 @@ config ENET_BIG_BUFFERS
Allocate large buffers for MPC8xx Etherenet. Increases throughput Allocate large buffers for MPC8xx Etherenet. Increases throughput
and decreases the likelihood of dropped packets, but costs memory. and decreases the likelihood of dropped packets, but costs memory.
config SMC2_UART
bool "Use SMC2 for UART"
help
If you would like to use SMC2 as a serial port, say Y here.
If in doubt, say Y here.
config ALTSMC2
bool "Use Alternate SMC2 I/O (823/850)"
depends on SMC2_UART
help
If you have an MPC823 or MPC850 and would like to use the alternate
SMC2 for I/O, say Y here.
If in doubt, say N here.
config CONS_SMC2
bool "Use SMC2 for Console"
depends on SMC2_UART
help
If you are going to have a serial console on your device and are
using SMC2 for your serial port, say Y here, else say N.
config USE_SCC_IO
bool "Enable SCC2 and SCC3 for UART"
help
If your MPC8xx board has other SCC ports that you would like to use
for for a serial port, say Y here.
If in doubt, say N here.
config HTDMSOUND config HTDMSOUND
bool "Embedded Planet HIOX Audio" bool "Embedded Planet HIOX Audio"
depends on SOUND=y depends on SOUND=y
...@@ -134,13 +103,36 @@ config 8xx_CPU6 ...@@ -134,13 +103,36 @@ config 8xx_CPU6
If in doubt, say N here. If in doubt, say N here.
config UCODE_PATCH choice
bool "I2C/SPI Microcode Patch" prompt "Microcode patch selection"
default NO_UCODE_PATCH
help
Help not implemented yet, coming soon.
config NO_UCODE_PATCH
bool "None"
config USB_SOF_UCODE_PATCH
bool "USB SOF patch"
help
Help not implemented yet, coming soon.
config I2C_SPI_UCODE_PATCH
bool "I2C/SPI relocation patch"
help help
Motorola releases microcode updates for their 8xx CPM modules. The Help not implemented yet, coming soon.
microcode update file has updates for IIC, SMC and USB. Currently only
the USB update is available by default, if the MPC8xx USB option is config I2C_SPI_SMC1_UCODE_PATCH
enabled. If in doubt, say 'N' here. bool "I2C/SPI/SMC1 relocation patch"
help
Help not implemented yet, coming soon.
endchoice
config UCODE_PATCH
bool
default y
depends on !NO_UCODE_PATCH
endmenu endmenu
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Makefile for the linux MPC8xx ppc-specific parts of comm processor # Makefile for the linux MPC8xx ppc-specific parts of comm processor
# #
obj-y := commproc.o uart.o obj-y := commproc.o
obj-$(CONFIG_FEC_ENET) += fec.o obj-$(CONFIG_FEC_ENET) += fec.o
obj-$(CONFIG_SCC_ENET) += enet.o obj-$(CONFIG_SCC_ENET) += enet.o
......
This diff is collapsed.
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <asm/8xx_immap.h> #include <asm/8xx_immap.h>
...@@ -581,10 +582,10 @@ static void set_multicast_list(struct net_device *dev) ...@@ -581,10 +582,10 @@ static void set_multicast_list(struct net_device *dev)
/* Log any net taps. */ /* Log any net taps. */
printk("%s: Promiscuous mode enabled.\n", dev->name); printk("%s: Promiscuous mode enabled.\n", dev->name);
cep->sccp->scc_pmsr |= SCC_PMSR_PRO; cep->sccp->scc_psmr |= SCC_PSMR_PRO;
} else { } else {
cep->sccp->scc_pmsr &= ~SCC_PMSR_PRO; cep->sccp->scc_psmr &= ~SCC_PSMR_PRO;
if (dev->flags & IFF_ALLMULTI) { if (dev->flags & IFF_ALLMULTI) {
/* Catch all multicast addresses, so set the /* Catch all multicast addresses, so set the
...@@ -835,7 +836,8 @@ static int __init scc_enet_init(void) ...@@ -835,7 +836,8 @@ static int __init scc_enet_init(void)
/* Allocate a page. /* Allocate a page.
*/ */
ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); ba = (unsigned char *)dma_alloc_coherent(NULL, PAGE_SIZE,
&mem_addr, GFP_KERNEL);
/* BUG: no check for failure */ /* BUG: no check for failure */
/* Initialize the BD for every fragment in the page. /* Initialize the BD for every fragment in the page.
...@@ -889,7 +891,7 @@ static int __init scc_enet_init(void) ...@@ -889,7 +891,7 @@ static int __init scc_enet_init(void)
/* Set processing mode. Use Ethernet CRC, catch broadcast, and /* Set processing mode. Use Ethernet CRC, catch broadcast, and
* start frame search 22 bit times after RENA. * start frame search 22 bit times after RENA.
*/ */
sccp->scc_pmsr = (SCC_PMSR_ENCRC | SCC_PMSR_NIB22); sccp->scc_psmr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22);
/* It is now OK to enable the Ethernet transmitter. /* It is now OK to enable the Ethernet transmitter.
* Unfortunately, there are board implementation differences here. * Unfortunately, there are board implementation differences here.
......
...@@ -1684,7 +1684,7 @@ static int __init fec_enet_init(void) ...@@ -1684,7 +1684,7 @@ static int __init fec_enet_init(void)
/* Install our interrupt handler. /* Install our interrupt handler.
*/ */
if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) if (request_irq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
panic("Could not allocate FEC IRQ!"); panic("Could not allocate FEC IRQ!");
#ifdef CONFIG_RPXCLASSIC #ifdef CONFIG_RPXCLASSIC
...@@ -1705,7 +1705,7 @@ static int __init fec_enet_init(void) ...@@ -1705,7 +1705,7 @@ static int __init fec_enet_init(void)
((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel |= ((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel |=
(0x80000000 >> PHY_INTERRUPT); (0x80000000 >> PHY_INTERRUPT);
if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 0) if (request_irq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 0)
panic("Could not allocate MII IRQ!"); panic("Could not allocate MII IRQ!");
#endif #endif
......
...@@ -19,18 +19,12 @@ ...@@ -19,18 +19,12 @@
#include <asm/8xx_immap.h> #include <asm/8xx_immap.h>
#include <asm/commproc.h> #include <asm/commproc.h>
/* Define this to get SMC patches as well. You need to modify the uart /*
* driver as well...... * I2C/SPI relocation patch arrays.
#define USE_SMC_PATCH 1
*/ */
#ifdef CONFIG_USB_MPC8xx #ifdef CONFIG_I2C_SPI_UCODE_PATCH
#define USE_USB_SOF_PATCH
#endif
#ifdef USE_IIC_PATCH
#define PATCH_DEFINED
/* IIC/SPI */
uint patch_2000[] = { uint patch_2000[] = {
0x7FFFEFD9, 0x7FFFEFD9,
0x3FFD0000, 0x3FFD0000,
...@@ -183,11 +177,12 @@ uint patch_2f00[] = { ...@@ -183,11 +177,12 @@ uint patch_2f00[] = {
}; };
#endif #endif
#ifdef USE_SMC_PATCH /*
#define PATCH_DEFINED * I2C/SPI/SMC1 relocation patch arrays.
/* SMC2/IIC/SPI Patch */ */
/* This is the area from 0x2000 to 0x23ff.
*/ #ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
uint patch_2000[] = { uint patch_2000[] = {
0x3fff0000, 0x3fff0000,
0x3ffd0000, 0x3ffd0000,
...@@ -511,8 +506,6 @@ uint patch_2000[] = { ...@@ -511,8 +506,6 @@ uint patch_2000[] = {
0x6079e2bb 0x6079e2bb
}; };
/* This is from 0x2f00 to 0x2fff
*/
uint patch_2f00[] = { uint patch_2f00[] = {
0x30303030, 0x30303030,
0x3e3e3434, 0x3e3e3434,
...@@ -581,8 +574,6 @@ uint patch_2f00[] = { ...@@ -581,8 +574,6 @@ uint patch_2f00[] = {
}; };
uint patch_2e00[] = { uint patch_2e00[] = {
/* This is from 0x2e00 to 0x2e3c
*/
0x27eeeeee, 0x27eeeeee,
0xeeeeeeee, 0xeeeeeeee,
0xeeeeeeee, 0xeeeeeeee,
...@@ -602,8 +593,12 @@ uint patch_2e00[] = { ...@@ -602,8 +593,12 @@ uint patch_2e00[] = {
}; };
#endif #endif
#ifdef USE_USB_SOF_PATCH /*
#define PATCH_DEFINED * USB SOF patch arrays.
*/
#ifdef CONFIG_USB_SOF_UCODE_PATCH
uint patch_2000[] = { uint patch_2000[] = {
0x7fff0000, 0x7fff0000,
0x7ffd0000, 0x7ffd0000,
...@@ -626,33 +621,21 @@ uint patch_2f00[] = { ...@@ -626,33 +621,21 @@ uint patch_2f00[] = {
}; };
#endif #endif
/* Load the microcode patch. This is called early in the CPM initialization
* with the controller in the reset state. We enable the processor after
* we load the patch.
*/
void void
cpm_load_patch(volatile immap_t *immr) cpm_load_patch(volatile immap_t *immr)
{ {
#ifdef PATCH_DEFINED volatile uint *dp; /* Dual-ported RAM. */
volatile uint *dp;
volatile cpm8xx_t *commproc; volatile cpm8xx_t *commproc;
volatile iic_t *iip; volatile iic_t *iip;
volatile spi_t *spp; volatile spi_t *spp;
volatile smc_uart_t *smp;
int i; int i;
commproc = (cpm8xx_t *)&immr->im_cpm; commproc = (cpm8xx_t *)&immr->im_cpm;
/* We work closely with commproc.c. We know it only allocates #ifdef CONFIG_USB_SOF_UCODE_PATCH
* from data only space.
* For this particular patch, we only use the bottom 512 bytes
* and the upper 256 byte extension. We will use the space
* starting at 1K for the relocated parameters, as the general
* CPM allocation won't come from that area.
*/
commproc->cp_rccr = 0; commproc->cp_rccr = 0;
/* Copy the patch into DPRAM.
*/
dp = (uint *)(commproc->cp_dpmem); dp = (uint *)(commproc->cp_dpmem);
for (i=0; i<(sizeof(patch_2000)/4); i++) for (i=0; i<(sizeof(patch_2000)/4); i++)
*dp++ = patch_2000[i]; *dp++ = patch_2000[i];
...@@ -661,29 +644,26 @@ cpm_load_patch(volatile immap_t *immr) ...@@ -661,29 +644,26 @@ cpm_load_patch(volatile immap_t *immr)
for (i=0; i<(sizeof(patch_2f00)/4); i++) for (i=0; i<(sizeof(patch_2f00)/4); i++)
*dp++ = patch_2f00[i]; *dp++ = patch_2f00[i];
#ifdef USE_USB_SOF_PATCH commproc->cp_rccr = 0x0009;
#if 0 /* usb patch should not relocate iic */
iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
#define RPBASE 0x0030
iip->iic_rpbase = RPBASE;
/* Put SPI above the IIC, also 32-byte aligned. printk("USB SOF microcode patch installed\n");
*/ #endif /* CONFIG_USB_SOF_UCODE_PATCH */
i = (RPBASE + sizeof(iic_t) + 31) & ~31;
spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
spp->spi_rpbase = i;
#endif
/* Enable uCode fetches from DPRAM. */ #if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
commproc->cp_rccr = 0x0009; defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
commproc->cp_rccr = 0;
printk("USB uCode patch installed\n"); dp = (uint *)(commproc->cp_dpmem);
#endif /* USE_USB_SOF_PATCH */ for (i=0; i<(sizeof(patch_2000)/4); i++)
*dp++ = patch_2000[i];
#if defined(USE_SMC_PATCH) || defined(USE_IIC_PATCH) dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
for (i=0; i<(sizeof(patch_2f00)/4); i++)
*dp++ = patch_2f00[i];
iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC]; iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
#define RPBASE 0x0400 # define RPBASE 0x0500
iip->iic_rpbase = RPBASE; iip->iic_rpbase = RPBASE;
/* Put SPI above the IIC, also 32-byte aligned. /* Put SPI above the IIC, also 32-byte aligned.
...@@ -692,58 +672,46 @@ cpm_load_patch(volatile immap_t *immr) ...@@ -692,58 +672,46 @@ cpm_load_patch(volatile immap_t *immr)
spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
spp->spi_rpbase = i; spp->spi_rpbase = i;
#ifdef USE_SMC_PATCH # if defined(CONFIG_I2C_SPI_UCODE_PATCH)
commproc->cp_cpmcr1 = 0x802a;
commproc->cp_cpmcr2 = 0x8028;
commproc->cp_cpmcr3 = 0x802e;
commproc->cp_cpmcr4 = 0x802c;
commproc->cp_rccr = 1;
printk("I2C/SPI microcode patch installed.\n");
# endif /* CONFIG_I2C_SPI_UCODE_PATCH */
# if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
dp = (uint *)&(commproc->cp_dpmem[0x0e00]); dp = (uint *)&(commproc->cp_dpmem[0x0e00]);
for (i=0; i<(sizeof(patch_2e00)/4); i++) for (i=0; i<(sizeof(patch_2e00)/4); i++)
*dp++ = patch_2e00[i]; *dp++ = patch_2e00[i];
/* Enable the traps to get to it.
*/
commproc->cp_cpmcr1 = 0x8080; commproc->cp_cpmcr1 = 0x8080;
commproc->cp_cpmcr2 = 0x808a; commproc->cp_cpmcr2 = 0x808a;
commproc->cp_cpmcr3 = 0x8028; commproc->cp_cpmcr3 = 0x8028;
commproc->cp_cpmcr4 = 0x802a; commproc->cp_cpmcr4 = 0x802a;
/* Enable uCode fetches from DPRAM.
*/
commproc->cp_rccr = 3; commproc->cp_rccr = 3;
#endif
#ifdef USE_IIC_PATCH
/* Enable the traps to get to it.
*/
commproc->cp_cpmcr1 = 0x802a;
commproc->cp_cpmcr2 = 0x8028;
commproc->cp_cpmcr3 = 0x802e;
commproc->cp_cpmcr4 = 0x802c;
/* Enable uCode fetches from DPRAM. smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1];
*/ smp->smc_rpbase = 0x1FC0;
commproc->cp_rccr = 1;
printk("I2C uCode patch installed\n");
#endif
/* Relocate the IIC and SPI parameter areas. These have to printk("I2C/SPI/SMC1 microcode patch installed.\n");
* aligned on 32-byte boundaries. # endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */
*/
iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
iip->iic_rpbase = RPBASE;
/* Put SPI above the IIC, also 32-byte aligned.
*/
i = (RPBASE + sizeof(iic_t) + 31) & ~31;
spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
spp->spi_rpbase = i;
#endif /* USE_SMC_PATCH || USE_IIC_PATCH */ #endif /* some variation of the I2C/SPI patch was selected */
#endif /* PATCH_DEFINED */
} }
/*
* Take this entire routine out, since no one calls it and its
* logic is suspect.
*/
#if 0
void void
verify_patch(volatile immap_t *immr) verify_patch(volatile immap_t *immr)
{ {
#ifdef PATCH_DEFINED
volatile uint *dp; volatile uint *dp;
volatile cpm8xx_t *commproc; volatile cpm8xx_t *commproc;
int i; int i;
...@@ -772,6 +740,5 @@ verify_patch(volatile immap_t *immr) ...@@ -772,6 +740,5 @@ verify_patch(volatile immap_t *immr)
} }
commproc->cp_rccr = 0x0009; commproc->cp_rccr = 0x0009;
#endif /* PATCH_DEFINED */
} }
#endif
This diff is collapsed.
...@@ -74,6 +74,7 @@ config POWER4 ...@@ -74,6 +74,7 @@ config POWER4
bool "POWER4 and 970 (G5)" bool "POWER4 and 970 (G5)"
config 8xx config 8xx
depends on BROKEN
bool "8xx" bool "8xx"
config E500 config E500
...@@ -756,11 +757,6 @@ config PC_KEYBOARD ...@@ -756,11 +757,6 @@ config PC_KEYBOARD
bool "PC PS/2 style Keyboard" bool "PC PS/2 style Keyboard"
depends on 4xx || CPM2 depends on 4xx || CPM2
config SERIAL_CONSOLE
bool
depends on 8xx
default y
config SERIAL_CONSOLE_BAUD config SERIAL_CONSOLE_BAUD
int int
depends on EV64260 depends on EV64260
......
...@@ -295,25 +295,27 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -295,25 +295,27 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
# CONFIG_SERIAL_CPM_ALT_SMC2 is not set
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -478,10 +480,6 @@ CONFIG_SCC1_ENET=y ...@@ -478,10 +480,6 @@ CONFIG_SCC1_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
# CONFIG_ALTSMC2 is not set
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -319,25 +319,26 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -319,25 +319,26 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
# CONFIG_SERIAL_CPM_SMC2 is not set
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -507,8 +508,6 @@ CONFIG_FEC_LXT970=y ...@@ -507,8 +508,6 @@ CONFIG_FEC_LXT970=y
CONFIG_FEC_LXT971=y CONFIG_FEC_LXT971=y
CONFIG_FEC_QS6612=y CONFIG_FEC_QS6612=y
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
# CONFIG_SMC2_UART is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -92,7 +92,8 @@ CONFIG_KERNEL_ELF=y ...@@ -92,7 +92,8 @@ CONFIG_KERNEL_ELF=y
# Parallel port support # Parallel port support
# #
# CONFIG_PARPORT is not set # CONFIG_PARPORT is not set
# CONFIG_CMDLINE_BOOL is not set CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyCPM1"
# #
# Advanced setup # Advanced setup
...@@ -296,25 +297,27 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -296,25 +297,27 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_SERIAL_CPM_ALT_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -479,10 +482,6 @@ CONFIG_SCC_ENET=y ...@@ -479,10 +482,6 @@ CONFIG_SCC_ENET=y
CONFIG_SCC3_ENET=y CONFIG_SCC3_ENET=y
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
CONFIG_ALTSMC2=y
CONFIG_CONS_SMC2=y
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -295,25 +295,27 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -295,25 +295,27 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
# CONFIG_SERIAL_CPM_SMC2 is not set
CONFIG_SERIAL_CPM_ALT_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -478,10 +480,6 @@ CONFIG_SCC2_ENET=y ...@@ -478,10 +480,6 @@ CONFIG_SCC2_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
CONFIG_ALTSMC2=y
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -296,25 +296,27 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -296,25 +296,27 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_SERIAL_CPM_ALT_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -479,10 +481,6 @@ CONFIG_SCC2_ENET=y ...@@ -479,10 +481,6 @@ CONFIG_SCC2_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
CONFIG_ALTSMC2=y
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -296,25 +296,27 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -296,25 +296,27 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_SERIAL_CPM_ALT_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -479,10 +481,6 @@ CONFIG_SCC2_ENET=y ...@@ -479,10 +481,6 @@ CONFIG_SCC2_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
CONFIG_ALTSMC2=y
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -320,25 +320,26 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -320,25 +320,26 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=32 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -508,10 +509,6 @@ CONFIG_SCC1_ENET=y ...@@ -508,10 +509,6 @@ CONFIG_SCC1_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
# CONFIG_ALTSMC2 is not set
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -292,25 +292,26 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -292,25 +292,26 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
# CONFIG_SERIAL_CPM_SCC2 is not set
# CONFIG_SERIAL_CPM_SCC3 is not set
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256 # CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -476,10 +477,6 @@ CONFIG_SCC2_ENET=y ...@@ -476,10 +477,6 @@ CONFIG_SCC2_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
# CONFIG_ENET_BIG_BUFFERS is not set # CONFIG_ENET_BIG_BUFFERS is not set
CONFIG_SMC2_UART=y
# CONFIG_ALTSMC2 is not set
# CONFIG_CONS_SMC2 is not set
# CONFIG_USE_SCC_IO is not set
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
...@@ -289,24 +289,26 @@ CONFIG_SOUND_GAMEPORT=y ...@@ -289,24 +289,26 @@ CONFIG_SOUND_GAMEPORT=y
# Macintosh device drivers # Macintosh device drivers
# #
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
# #
# Serial drivers # Serial drivers
# #
CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
# #
# Non-8250 serial port support # Non-8250 serial port support
# #
CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_UNIX98_PTYS is not set CONFIG_SERIAL_CPM=y
CONFIG_SERIAL_CPM_CONSOLE=y
# CONFIG_SERIAL_CPM_SCC1 is not set
CONFIG_SERIAL_CPM_SCC2=y
CONFIG_SERIAL_CPM_SCC3=y
# CONFIG_SERIAL_CPM_SCC4 is not set
CONFIG_SERIAL_CPM_SMC1=y
CONFIG_SERIAL_CPM_SMC2=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
# #
# I2C support # I2C support
...@@ -470,10 +472,6 @@ CONFIG_SCC1_ENET=y ...@@ -470,10 +472,6 @@ CONFIG_SCC1_ENET=y
# CONFIG_SCC3_ENET is not set # CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y CONFIG_ENET_BIG_BUFFERS=y
CONFIG_SMC2_UART=y
# CONFIG_ALTSMC2 is not set
# CONFIG_CONS_SMC2 is not set
CONFIG_USE_SCC_IO=y
# #
# Generic MPC8xx Options # Generic MPC8xx Options
......
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,7 @@ obj-$(CONFIG_SMP) += smp.o smp-tbsync.o ...@@ -25,7 +25,7 @@ obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_TAU) += temp.o
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
ifdef CONFIG_MATH_EMULATION ifndef CONFIG_MATH_EMULATION
obj-$(CONFIG_8xx) += softemu8xx.o obj-$(CONFIG_8xx) += softemu8xx.o
endif endif
This diff is collapsed.
...@@ -321,9 +321,6 @@ EXPORT_SYMBOL(cpm_free_handler); ...@@ -321,9 +321,6 @@ EXPORT_SYMBOL(cpm_free_handler);
#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) #if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx)
EXPORT_SYMBOL(__res); EXPORT_SYMBOL(__res);
#endif #endif
#if defined(CONFIG_8xx)
EXPORT_SYMBOL(request_8xxirq);
#endif
EXPORT_SYMBOL(next_mmu_context); EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context); EXPORT_SYMBOL(set_context);
......
...@@ -133,7 +133,7 @@ Soft_emulate_8xx(struct pt_regs *regs) ...@@ -133,7 +133,7 @@ Soft_emulate_8xx(struct pt_regs *regs)
print_8xx_pte(current->mm,regs->nip); print_8xx_pte(current->mm,regs->nip);
pa = get_8xx_pte(current->mm,regs->nip) & PAGE_MASK; pa = get_8xx_pte(current->mm,regs->nip) & PAGE_MASK;
pa |= (regs->nip & ~PAGE_MASK); pa |= (regs->nip & ~PAGE_MASK);
pa = __va(pa); pa = (unsigned long)__va(pa);
printk("Kernel VA for NIP %x ", pa); printk("Kernel VA for NIP %x ", pa);
print_8xx_pte(current->mm,pa); print_8xx_pte(current->mm,pa);
} }
......
...@@ -82,7 +82,6 @@ extern bd_t m8xx_board_info; ...@@ -82,7 +82,6 @@ extern bd_t m8xx_board_info;
/* for pcmcia sandisk */ /* for pcmcia sandisk */
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
# define MAX_HWIFS 1 # define MAX_HWIFS 1
# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
#endif #endif
......
...@@ -68,7 +68,6 @@ extern bd_t m8xx_board_info; ...@@ -68,7 +68,6 @@ extern bd_t m8xx_board_info;
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
# define MAX_HWIFS 1 # define MAX_HWIFS 1
# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
/* CPM Ethernet through SCCx. /* CPM Ethernet through SCCx.
......
...@@ -72,8 +72,6 @@ static __inline__ void ide_led(int on) ...@@ -72,8 +72,6 @@ static __inline__ void ide_led(int on)
#define IDE0_INTERRUPT 13 #define IDE0_INTERRUPT 13
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
#define ide_request_irq(irq,hand,flg,dev,id) \
request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
......
...@@ -57,8 +57,10 @@ unsigned char __res[sizeof(bd_t)]; ...@@ -57,8 +57,10 @@ unsigned char __res[sizeof(bd_t)];
extern void m8xx_ide_init(void); extern void m8xx_ide_init(void);
extern unsigned long find_available_memory(void); extern unsigned long find_available_memory(void);
extern void m8xx_cpm_reset(uint); extern void m8xx_cpm_reset(uint cpm_page);
extern void m8xx_wdt_handler_install(bd_t *bp);
extern void rpxfb_alloc_pages(void); extern void rpxfb_alloc_pages(void);
extern void cpm_interrupt_init(void);
void __attribute__ ((weak)) void __attribute__ ((weak))
board_init(void) board_init(void)
...@@ -123,11 +125,19 @@ abort(void) ...@@ -123,11 +125,19 @@ abort(void)
} }
/* A place holder for time base interrupts, if they are ever enabled. */ /* A place holder for time base interrupts, if they are ever enabled. */
void timebase_interrupt(int irq, void * dev, struct pt_regs * regs) irqreturn_t timebase_interrupt(int irq, void * dev, struct pt_regs * regs)
{ {
printk ("timebase_interrupt()\n"); printk ("timebase_interrupt()\n");
return IRQ_HANDLED;
} }
static struct irqaction tbint_irqaction = {
.handler = timebase_interrupt,
.mask = CPU_MASK_NONE,
.name = "tbint",
};
/* The decrementer counts at the system (internal) clock frequency divided by /* The decrementer counts at the system (internal) clock frequency divided by
* sixteen, or external oscillator divided by four. We force the processor * sixteen, or external oscillator divided by four. We force the processor
* to use system clock divided by sixteen. * to use system clock divided by sixteen.
...@@ -192,8 +202,15 @@ void __init m8xx_calibrate_decr(void) ...@@ -192,8 +202,15 @@ void __init m8xx_calibrate_decr(void)
((mk_int_int_mask(DEC_INTERRUPT) << 8) | ((mk_int_int_mask(DEC_INTERRUPT) << 8) |
(TBSCR_TBF | TBSCR_TBE)); (TBSCR_TBF | TBSCR_TBE));
if (request_8xxirq(DEC_INTERRUPT, timebase_interrupt, 0, "tbint", NULL) != 0) if (setup_irq(DEC_INTERRUPT, &tbint_irqaction))
panic("Could not allocate timer IRQ!"); panic("Could not allocate timer IRQ!");
#ifdef CONFIG_8xx_WDT
/* Install watchdog timer handler early because it might be
* already enabled by the bootloader
*/
m8xx_wdt_handler_install(binfo);
#endif
} }
/* The RTC on the MPC8xx is an internal register. /* The RTC on the MPC8xx is an internal register.
...@@ -261,6 +278,14 @@ m8xx_show_percpuinfo(struct seq_file *m, int i) ...@@ -261,6 +278,14 @@ m8xx_show_percpuinfo(struct seq_file *m, int i)
return 0; return 0;
} }
#ifdef CONFIG_PCI
static struct irqaction mbx_i8259_irqaction = {
.handler = mbx_i8259_action,
.mask = CPU_MASK_NONE,
.name = "i8259 cascade",
};
#endif
/* Initialize the internal interrupt controller. The number of /* Initialize the internal interrupt controller. The number of
* interrupts supported can vary with the processor type, and the * interrupts supported can vary with the processor type, and the
* 82xx family can have up to 64. * 82xx family can have up to 64.
...@@ -271,25 +296,26 @@ static void __init ...@@ -271,25 +296,26 @@ static void __init
m8xx_init_IRQ(void) m8xx_init_IRQ(void)
{ {
int i; int i;
void cpm_interrupt_init(void);
for ( i = 0 ; i < NR_SIU_INTS ; i++ ) for (i = SIU_IRQ_OFFSET ; i < SIU_IRQ_OFFSET + NR_SIU_INTS ; i++)
irq_desc[i].handler = &ppc8xx_pic; irq_desc[i].handler = &ppc8xx_pic;
/* We could probably incorporate the CPM into the multilevel
* interrupt structure.
*/
cpm_interrupt_init(); cpm_interrupt_init();
unmask_irq(CPM_INTERRUPT);
#if defined(CONFIG_PCI) #if defined(CONFIG_PCI)
for ( i = NR_SIU_INTS ; i < (NR_SIU_INTS + NR_8259_INTS) ; i++ ) for (i = I8259_IRQ_OFFSET ; i < I8259_IRQ_OFFSET + NR_8259_INTS ; i++)
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
i8259_pic.irq_offset = NR_SIU_INTS;
i8259_init(); i8259_pic_irq_offset = I8259_IRQ_OFFSET;
request_8xxirq(ISA_BRIDGE_INT, mbx_i8259_action, 0, "8259 cascade", NULL); i8259_init(0);
enable_irq(ISA_BRIDGE_INT);
#endif /* The i8259 cascade interrupt must be level sensitive. */
((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel &=
~(0x80000000 >> ISA_BRIDGE_INT);
if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction))
enable_irq(ISA_BRIDGE_INT);
#endif /* CONFIG_PCI */
} }
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
...@@ -340,7 +366,7 @@ m8xx_map_io(void) ...@@ -340,7 +366,7 @@ m8xx_map_io(void)
io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO); io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);
#endif #endif
#endif #endif
#ifdef CONFIG_HTDMSOUND #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO); io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
#endif #endif
#ifdef CONFIG_FADS #ifdef CONFIG_FADS
...@@ -349,6 +375,9 @@ m8xx_map_io(void) ...@@ -349,6 +375,9 @@ m8xx_map_io(void)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
io_block_mapping(PCI_CSR_ADDR, PCI_CSR_ADDR, PCI_CSR_SIZE, _PAGE_IO); io_block_mapping(PCI_CSR_ADDR, PCI_CSR_ADDR, PCI_CSR_SIZE, _PAGE_IO);
#endif #endif
#if defined(CONFIG_NETTA)
io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);
#endif
} }
void __init void __init
......
This diff is collapsed.
...@@ -70,6 +70,8 @@ struct uart_cpm_port { ...@@ -70,6 +70,8 @@ struct uart_cpm_port {
/* helpers */ /* helpers */
int baud; int baud;
int bits; int bits;
/* Keep track of 'odd' SMC2 wirings */
int is_portb;
}; };
extern int cpm_uart_port_map[UART_NR]; extern int cpm_uart_port_map[UART_NR];
......
...@@ -743,6 +743,18 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo) ...@@ -743,6 +743,18 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)
pinfo->smcup->smc_rbase = (u_char *)pinfo->rx_bd_base - DPRAM_BASE; pinfo->smcup->smc_rbase = (u_char *)pinfo->rx_bd_base - DPRAM_BASE;
pinfo->smcup->smc_tbase = (u_char *)pinfo->tx_bd_base - DPRAM_BASE; pinfo->smcup->smc_tbase = (u_char *)pinfo->tx_bd_base - DPRAM_BASE;
/*
* In case SMC1 is being relocated...
*/
#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
up->smc_rbptr = pinfo->smcup->smc_rbase;
up->smc_tbptr = pinfo->smcup->smc_tbase;
up->smc_rstate = 0;
up->smc_tstate = 0;
up->smc_brkcr = 1; /* number of break chars */
up->smc_brkec = 0;
#endif
/* Set up the uart parameters in the /* Set up the uart parameters in the
* parameter ram. * parameter ram.
*/ */
...@@ -872,6 +884,9 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = { ...@@ -872,6 +884,9 @@ struct uart_cpm_port cpm_uart_ports[UART_NR] = {
.rx_nrfifos = RX_NUM_FIFO, .rx_nrfifos = RX_NUM_FIFO,
.rx_fifosize = RX_BUF_SIZE, .rx_fifosize = RX_BUF_SIZE,
.set_lineif = smc2_lineif, .set_lineif = smc2_lineif,
#ifdef CONFIG_SERIAL_CPM_ALT_SMC2
.is_portb = 1,
#endif
}, },
[UART_SCC1] = { [UART_SCC1] = {
.port = { .port = {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment