]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'sh/serial-rework' and 'sh/oprofile'
authorPaul Mundt <lethal@linux-sh.org>
Tue, 28 Oct 2008 10:44:15 +0000 (19:44 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 28 Oct 2008 10:44:15 +0000 (19:44 +0900)
107 files changed:
arch/mips/Kconfig
arch/mips/Makefile
arch/mips/alchemy/common/platform.c
arch/mips/alchemy/pb1200/platform.c
arch/mips/configs/pnx8335-stb225_defconfig [new file with mode: 0644]
arch/mips/emma/Kconfig [new file with mode: 0644]
arch/mips/emma/common/Makefile [moved from arch/mips/emma2rh/common/Makefile with 88% similarity]
arch/mips/emma/common/prom.c [moved from arch/mips/emma2rh/common/prom.c with 95% similarity]
arch/mips/emma/markeins/Makefile [moved from arch/mips/emma2rh/markeins/Makefile with 85% similarity]
arch/mips/emma/markeins/irq.c [new file with mode: 0644]
arch/mips/emma/markeins/led.c [moved from arch/mips/emma2rh/markeins/led.c with 97% similarity]
arch/mips/emma/markeins/platform.c [moved from arch/mips/emma2rh/markeins/platform.c with 99% similarity]
arch/mips/emma/markeins/setup.c [moved from arch/mips/emma2rh/markeins/setup.c with 99% similarity]
arch/mips/emma2rh/common/irq.c [deleted file]
arch/mips/emma2rh/common/irq_emma2rh.c [deleted file]
arch/mips/emma2rh/markeins/irq.c [deleted file]
arch/mips/emma2rh/markeins/irq_markeins.c [deleted file]
arch/mips/include/asm/emma/emma2rh.h [moved from arch/mips/include/asm/emma2rh/emma2rh.h with 97% similarity]
arch/mips/include/asm/emma/markeins.h [moved from arch/mips/include/asm/emma2rh/markeins.h with 100% similarity]
arch/mips/include/asm/mach-lemote/pci.h [new file with mode: 0644]
arch/mips/include/asm/mach-pnx833x/gpio.h [new file with mode: 0644]
arch/mips/include/asm/mach-pnx833x/irq-mapping.h [new file with mode: 0644]
arch/mips/include/asm/mach-pnx833x/irq.h [new file with mode: 0644]
arch/mips/include/asm/mach-pnx833x/pnx833x.h [new file with mode: 0644]
arch/mips/include/asm/mach-pnx833x/war.h [new file with mode: 0644]
arch/mips/include/asm/mach-tx49xx/mangle-port.h [new file with mode: 0644]
arch/mips/include/asm/mipsregs.h
arch/mips/include/asm/module.h
arch/mips/include/asm/ptrace.h
arch/mips/include/asm/txx9/generic.h
arch/mips/kernel/Makefile
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/setup.c
arch/mips/kernel/smp.c
arch/mips/kernel/unaligned.c
arch/mips/lemote/lm2e/pci.c
arch/mips/lemote/lm2e/setup.c
arch/mips/lib/Makefile
arch/mips/lib/dump_tlb.c
arch/mips/math-emu/cp1emu.c
arch/mips/mm/Makefile
arch/mips/mm/dma-default.c
arch/mips/nxp/pnx833x/common/Makefile [new file with mode: 0644]
arch/mips/nxp/pnx833x/common/interrupts.c [new file with mode: 0644]
arch/mips/nxp/pnx833x/common/platform.c [new file with mode: 0644]
arch/mips/nxp/pnx833x/common/prom.c [new file with mode: 0644]
arch/mips/nxp/pnx833x/common/reset.c [new file with mode: 0644]
arch/mips/nxp/pnx833x/common/setup.c [new file with mode: 0644]
arch/mips/nxp/pnx833x/stb22x/Makefile [new file with mode: 0644]
arch/mips/nxp/pnx833x/stb22x/board.c [new file with mode: 0644]
arch/mips/pci/Makefile
arch/mips/pci/fixup-emma2rh.c
arch/mips/pci/fixup-rc32434.c
arch/mips/pci/ops-emma2rh.c
arch/mips/pci/pci-emma2rh.c
arch/mips/rb532/devices.c
arch/mips/rb532/gpio.c
arch/mips/sgi-ip22/ip22-int.c
arch/mips/txx9/Kconfig
arch/mips/txx9/generic/7segled.c [new file with mode: 0644]
arch/mips/txx9/generic/Makefile
arch/mips/txx9/generic/setup.c
arch/mips/txx9/rbtx4939/setup.c
arch/sh/Makefile
arch/sh/configs/ul2_defconfig [new file with mode: 0644]
arch/sh/include/cpu-sh4/cpu/rtc.h
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/sh_ksyms_32.c
drivers/ata/libata-scsi.c
drivers/bluetooth/btsdio.c
drivers/cdrom/gdrom.c
drivers/char/hw_random/amd-rng.c
drivers/char/hw_random/geode-rng.c
drivers/char/hw_random/intel-rng.c
drivers/char/hw_random/via-rng.c
drivers/firewire/fw-ohci.c
drivers/firewire/fw-sbp2.c
drivers/firewire/fw-topology.c
drivers/firewire/fw-transaction.h
drivers/input/misc/sgi_btns.c
drivers/leds/leds-da903x.c
drivers/net/wireless/libertas/rx.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
fs/coda/psdev.c
fs/nfs/inode.c
fs/nfs/super.c
fs/proc/array.c
include/linux/phonet.h
include/net/phonet/phonet.h
include/scsi/scsi_tcq.h
net/ipv4/tcp_output.c
net/phonet/af_phonet.c
sound/oss/kahlua.c
sound/pci/ad1889.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0.c
sound/pci/bt87x.c
sound/pci/cs4281.c
sound/pci/cs5530.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c
sound/pci/mixart/mixart.c
sound/soc/blackfin/bf5xx-i2s.c
sound/sound_core.c

index 5f149b030c0f9fc7949793c6d8591d4bf0fd0450..653574bc19cf0c52a99f0c5ef76145c61d52d1fa 100644 (file)
@@ -238,21 +238,8 @@ config MIPS_SIM
          This option enables support for MIPS Technologies MIPSsim software
          emulator.
 
-config MARKEINS
-       bool "NEC EMMA2RH Mark-eins"
-       select CEVT_R4K
-       select CSRC_R4K
-       select DMA_NONCOHERENT
-       select HW_HAS_PCI
-       select IRQ_CPU
-       select SWAP_IO_SPACE
-       select SYS_SUPPORTS_32BIT_KERNEL
-       select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_LITTLE_ENDIAN
-       select SYS_HAS_CPU_R5000
-       help
-         This enables support for the R5432-based NEC Mark-eins
-         boards with R5500 CPU.
+config MACH_EMMA
+       bool "NEC EMMA series based machines"
 
 config MACH_VR41XX
        bool "NEC VR4100 series based machines"
@@ -261,6 +248,19 @@ config MACH_VR41XX
        select SYS_HAS_CPU_VR41XX
        select GENERIC_HARDIRQS_NO__DO_IRQ
 
+config NXP_STB220
+       bool "NXP STB220 board"
+       select SOC_PNX833X
+       help
+        Support for NXP Semiconductors STB220 Development Board.
+
+config NXP_STB225
+       bool "NXP 225 board"
+       select SOC_PNX833X
+       select SOC_PNX8335
+       help
+        Support for NXP Semiconductors STB225 Development Board.
+
 config PNX8550_JBS
        bool "NXP PNX8550 based JBS board"
        select PNX8550
@@ -601,6 +601,7 @@ endchoice
 
 source "arch/mips/alchemy/Kconfig"
 source "arch/mips/basler/excite/Kconfig"
+source "arch/mips/emma/Kconfig"
 source "arch/mips/jazz/Kconfig"
 source "arch/mips/lasat/Kconfig"
 source "arch/mips/pmc-sierra/Kconfig"
@@ -849,6 +850,24 @@ config MIPS_RM9122
        bool
        select SERIAL_RM9000
 
+config SOC_PNX833X
+       bool
+       select CEVT_R4K
+       select CSRC_R4K
+       select IRQ_CPU
+       select DMA_NONCOHERENT
+       select SYS_HAS_CPU_MIPS32_R2
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select SYS_SUPPORTS_LITTLE_ENDIAN
+       select SYS_SUPPORTS_BIG_ENDIAN
+       select GENERIC_HARDIRQS_NO__DO_IRQ
+       select GENERIC_GPIO
+       select CPU_MIPSR2_IRQ_VI
+
+config SOC_PNX8335
+       bool
+       select SOC_PNX833X
+
 config PNX8550
        bool
        select SOC_PNX8550
@@ -1092,6 +1111,16 @@ config CPU_R5432
        select CPU_SUPPORTS_32BIT_KERNEL
        select CPU_SUPPORTS_64BIT_KERNEL
 
+config CPU_R5500
+       bool "R5500"
+       depends on SYS_HAS_CPU_R5500
+       select CPU_HAS_LLSC
+       select CPU_SUPPORTS_32BIT_KERNEL
+       select CPU_SUPPORTS_64BIT_KERNEL
+       help
+         NEC VR5500 and VR5500A series processors implement 64-bit MIPS IV
+         instruction set.
+
 config CPU_R6000
        bool "R6000"
        depends on EXPERIMENTAL
@@ -1202,6 +1231,9 @@ config SYS_HAS_CPU_R5000
 config SYS_HAS_CPU_R5432
        bool
 
+config SYS_HAS_CPU_R5500
+       bool
+
 config SYS_HAS_CPU_R6000
        bool
 
index 7f39fd8a91fee83280792436e77266c0d81b3b49..28c55f608913c5da94e39127f62cdb72b94650a6 100644 (file)
@@ -131,6 +131,8 @@ cflags-$(CONFIG_CPU_MIPS64_R2)      += $(call cc-option,-march=mips64r2,-mips64r2 -U_
 cflags-$(CONFIG_CPU_R5000)     += -march=r5000 -Wa,--trap
 cflags-$(CONFIG_CPU_R5432)     += $(call cc-option,-march=r5400,-march=r5000) \
                        -Wa,--trap
+cflags-$(CONFIG_CPU_R5500)     += $(call cc-option,-march=r5500,-march=r5000) \
+                       -Wa,--trap
 cflags-$(CONFIG_CPU_NEVADA)    += $(call cc-option,-march=rm5200,-march=r5000) \
                        -Wa,--trap
 cflags-$(CONFIG_CPU_RM7000)    += $(call cc-option,-march=rm7000,-march=r5000) \
@@ -381,6 +383,14 @@ load-$(CONFIG_CASIO_E55)   += 0xffffffff80004000
 #
 load-$(CONFIG_TANBAC_TB022X)   += 0xffffffff80000000
 
+# NXP STB225
+core-$(CONFIG_SOC_PNX833X)             += arch/mips/nxp/pnx833x/common/
+cflags-$(CONFIG_SOC_PNX833X)   += -Iarch/mips/include/asm/mach-pnx833x
+libs-$(CONFIG_NXP_STB220)              += arch/mips/nxp/pnx833x/stb22x/
+load-$(CONFIG_NXP_STB220)              += 0xffffffff80001000
+libs-$(CONFIG_NXP_STB225)              += arch/mips/nxp/pnx833x/stb22x/
+load-$(CONFIG_NXP_STB225)              += 0xffffffff80001000
+
 #
 # Common NXP PNX8550
 #
@@ -399,14 +409,17 @@ load-$(CONFIG_PNX8550_JBS)        += 0xffffffff80060000
 libs-$(CONFIG_PNX8550_STB810)  += arch/mips/nxp/pnx8550/stb810/
 load-$(CONFIG_PNX8550_STB810)  += 0xffffffff80060000
 
-# NEC EMMA2RH boards
 #
-core-$(CONFIG_EMMA2RH)          += arch/mips/emma2rh/common/
-cflags-$(CONFIG_EMMA2RH)        += -I$(srctree)/arch/mips/include/asm/mach-emma2rh
+# Common NEC EMMAXXX
+#
+core-$(CONFIG_SOC_EMMA)                += arch/mips/emma/common/
+cflags-$(CONFIG_SOC_EMMA2RH)   += -I$(srctree)/arch/mips/include/asm/mach-emma2rh
 
+#
 # NEC EMMA2RH Mark-eins
-core-$(CONFIG_MARKEINS)         += arch/mips/emma2rh/markeins/
-load-$(CONFIG_MARKEINS)         += 0xffffffff88100000
+#
+core-$(CONFIG_NEC_MARKEINS)    += arch/mips/emma/markeins/
+load-$(CONFIG_NEC_MARKEINS)    += 0xffffffff88100000
 
 #
 # SGI IP22 (Indy/Indigo2)
index dc8a67efac284d523d690502573bcb15fcd24d55..5c76c6448e04c41d9c82e5e3eec4544f5f218f02 100644 (file)
@@ -17,6 +17,8 @@
 #include <linux/init.h>
 
 #include <asm/mach-au1x00/au1xxx.h>
+#include <asm/mach-au1x00/au1xxx_dbdma.h>
+#include <asm/mach-au1x00/au1100_mmc.h>
 
 #define PORT(_base, _irq)                              \
        {                                               \
@@ -163,24 +165,6 @@ static struct resource au1xxx_usb_gdt_resources[] = {
        },
 };
 
-static struct resource au1xxx_mmc_resources[] = {
-       [0] = {
-               .start          = SD0_PHYS_ADDR,
-               .end            = SD0_PHYS_ADDR + 0x7ffff,
-               .flags          = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start          = SD1_PHYS_ADDR,
-               .end            = SD1_PHYS_ADDR + 0x7ffff,
-               .flags          = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start          = AU1200_SD_INT,
-               .end            = AU1200_SD_INT,
-               .flags          = IORESOURCE_IRQ,
-       }
-};
-
 static u64 udc_dmamask = DMA_32BIT_MASK;
 
 static struct platform_device au1xxx_usb_gdt_device = {
@@ -249,16 +233,79 @@ static struct platform_device au1200_lcd_device = {
 
 static u64 au1xxx_mmc_dmamask =  DMA_32BIT_MASK;
 
-static struct platform_device au1xxx_mmc_device = {
+extern struct au1xmmc_platform_data au1xmmc_platdata[2];
+
+static struct resource au1200_mmc0_resources[] = {
+       [0] = {
+               .start          = SD0_PHYS_ADDR,
+               .end            = SD0_PHYS_ADDR + 0x7ffff,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = AU1200_SD_INT,
+               .end            = AU1200_SD_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start          = DSCR_CMD0_SDMS_TX0,
+               .end            = DSCR_CMD0_SDMS_TX0,
+               .flags          = IORESOURCE_DMA,
+       },
+       [3] = {
+               .start          = DSCR_CMD0_SDMS_RX0,
+               .end            = DSCR_CMD0_SDMS_RX0,
+               .flags          = IORESOURCE_DMA,
+       }
+};
+
+static struct platform_device au1200_mmc0_device = {
        .name = "au1xxx-mmc",
        .id = 0,
        .dev = {
-               .dma_mask               = &au1xxx_mmc_dmamask,
-               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .dma_mask               = &au1xxx_mmc_dmamask,
+               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .platform_data          = &au1xmmc_platdata[0],
        },
-       .num_resources  = ARRAY_SIZE(au1xxx_mmc_resources),
-       .resource       = au1xxx_mmc_resources,
+       .num_resources  = ARRAY_SIZE(au1200_mmc0_resources),
+       .resource       = au1200_mmc0_resources,
 };
+
+#ifndef CONFIG_MIPS_DB1200
+static struct resource au1200_mmc1_resources[] = {
+       [0] = {
+               .start          = SD1_PHYS_ADDR,
+               .end            = SD1_PHYS_ADDR + 0x7ffff,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = AU1200_SD_INT,
+               .end            = AU1200_SD_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start          = DSCR_CMD0_SDMS_TX1,
+               .end            = DSCR_CMD0_SDMS_TX1,
+               .flags          = IORESOURCE_DMA,
+       },
+       [3] = {
+               .start          = DSCR_CMD0_SDMS_RX1,
+               .end            = DSCR_CMD0_SDMS_RX1,
+               .flags          = IORESOURCE_DMA,
+       }
+};
+
+static struct platform_device au1200_mmc1_device = {
+       .name = "au1xxx-mmc",
+       .id = 1,
+       .dev = {
+               .dma_mask               = &au1xxx_mmc_dmamask,
+               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .platform_data          = &au1xmmc_platdata[1],
+       },
+       .num_resources  = ARRAY_SIZE(au1200_mmc1_resources),
+       .resource       = au1200_mmc1_resources,
+};
+#endif /* #ifndef CONFIG_MIPS_DB1200 */
 #endif /* #ifdef CONFIG_SOC_AU1200 */
 
 static struct platform_device au1x00_pcmcia_device = {
@@ -296,7 +343,10 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1xxx_usb_gdt_device,
        &au1xxx_usb_otg_device,
        &au1200_lcd_device,
-       &au1xxx_mmc_device,
+       &au1200_mmc0_device,
+#ifndef CONFIG_MIPS_DB1200
+       &au1200_mmc1_device,
+#endif
 #endif
 #ifdef SMBUS_PSC_BASE
        &pbdb_smbus_device,
index f8fb0aeac571d7795b41d3c74abc5403564147ce..95303297c5343d9da6714f364731f4ce70f13423 100644 (file)
 
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
+#include <linux/leds.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach-au1x00/au1xxx.h>
+#include <asm/mach-au1x00/au1100_mmc.h>
+
+static int mmc_activity;
+
+static void pb1200mmc0_set_power(void *mmc_host, int state)
+{
+       if (state)
+               bcsr->board |= BCSR_BOARD_SD0PWR;
+       else
+               bcsr->board &= ~BCSR_BOARD_SD0PWR;
+
+       au_sync_delay(1);
+}
+
+static int pb1200mmc0_card_readonly(void *mmc_host)
+{
+       return (bcsr->status & BCSR_STATUS_SD0WP) ? 1 : 0;
+}
+
+static int pb1200mmc0_card_inserted(void *mmc_host)
+{
+       return (bcsr->sig_status & BCSR_INT_SD0INSERT) ? 1 : 0;
+}
+
+static void pb1200_mmcled_set(struct led_classdev *led,
+                       enum led_brightness brightness)
+{
+       if (brightness != LED_OFF) {
+               if (++mmc_activity == 1)
+                       bcsr->disk_leds &= ~(1 << 8);
+       } else {
+               if (--mmc_activity == 0)
+                       bcsr->disk_leds |= (1 << 8);
+       }
+}
+
+static struct led_classdev pb1200mmc_led = {
+       .brightness_set = pb1200_mmcled_set,
+};
+
+#ifndef CONFIG_MIPS_DB1200
+static void pb1200mmc1_set_power(void *mmc_host, int state)
+{
+       if (state)
+               bcsr->board |= BCSR_BOARD_SD1PWR;
+       else
+               bcsr->board &= ~BCSR_BOARD_SD1PWR;
+
+       au_sync_delay(1);
+}
+
+static int pb1200mmc1_card_readonly(void *mmc_host)
+{
+       return (bcsr->status & BCSR_STATUS_SD1WP) ? 1 : 0;
+}
+
+static int pb1200mmc1_card_inserted(void *mmc_host)
+{
+       return (bcsr->sig_status & BCSR_INT_SD1INSERT) ? 1 : 0;
+}
+#endif
+
+const struct au1xmmc_platform_data au1xmmc_platdata[2] = {
+       [0] = {
+               .set_power      = pb1200mmc0_set_power,
+               .card_inserted  = pb1200mmc0_card_inserted,
+               .card_readonly  = pb1200mmc0_card_readonly,
+               .cd_setup       = NULL,         /* use poll-timer in driver */
+               .led            = &pb1200mmc_led,
+       },
+#ifndef CONFIG_MIPS_DB1200
+       [1] = {
+               .set_power      = pb1200mmc1_set_power,
+               .card_inserted  = pb1200mmc1_card_inserted,
+               .card_readonly  = pb1200mmc1_card_readonly,
+               .cd_setup       = NULL,         /* use poll-timer in driver */
+               .led            = &pb1200mmc_led,
+       },
+#endif
+};
 
 static struct resource ide_resources[] = {
        [0] = {
diff --git a/arch/mips/configs/pnx8335-stb225_defconfig b/arch/mips/configs/pnx8335-stb225_defconfig
new file mode 100644 (file)
index 0000000..d953652
--- /dev/null
@@ -0,0 +1,1149 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.26
+# Sat Jul 26 09:02:59 2008
+#
+CONFIG_MIPS=y
+
+#
+# Machine selection
+#
+# CONFIG_MACH_ALCHEMY is not set
+# CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_MACH_DECSTATION is not set
+# CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_LEMOTE_FULONG is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SIM is not set
+# CONFIG_MARKEINS is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+CONFIG_NXP_STB225=y
+# CONFIG_PNX8550_JBS is not set
+# CONFIG_PNX8550_STB810 is not set
+# CONFIG_PMC_MSP is not set
+# CONFIG_PMC_YOSEMITE is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
+# CONFIG_SGI_IP32 is not set
+# CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
+# CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
+# CONFIG_SNI_RM is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_WR_PPMC is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_HOTPLUG_CPU is not set
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_GPIO=y
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_SOC_PNX833X=y
+CONFIG_SOC_PNX8335=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+
+#
+# CPU selection
+#
+# CONFIG_CPU_LOONGSON2 is not set
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+# CONFIG_CPU_RM7000 is not set
+# CONFIG_CPU_RM9000 is not set
+# CONFIG_CPU_SB1 is not set
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPS32=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+
+#
+# Kernel type
+#
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_MT_SMTC is not set
+CONFIG_CPU_HAS_LLSC=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_48 is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_128=y
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_256 is not set
+# CONFIG_HZ_1000 is not set
+# CONFIG_HZ_1024 is not set
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_HZ=128
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
+# CONFIG_KEXEC is not set
+# CONFIG_SECCOMP is not set
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_KPROBES is not set
+# CONFIG_HAVE_KRETPROBES is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_CLASSIC_RCU=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, ISA, TC)
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_MMU=y
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_TRAD_SIGNALS=y
+
+#
+# Power management options
+#
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=y
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_LE_BYTE_SWAP=y
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x18000000
+CONFIG_MTD_PHYSMAP_LEN=0x04000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
+CONFIG_ATA_SFF=y
+# CONFIG_SATA_MV is not set
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_DM9000 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_VT_CONSOLE is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PNX8XXX=y
+CONFIG_SERIAL_PNX8XXX_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_DVB_CORE=y
+CONFIG_VIDEO_MEDIA=y
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=y
+CONFIG_MEDIA_TUNER_TDA8290=y
+CONFIG_MEDIA_TUNER_TDA9887=y
+CONFIG_MEDIA_TUNER_TEA5761=y
+CONFIG_MEDIA_TUNER_TEA5767=y
+CONFIG_MEDIA_TUNER_MT20XX=y
+CONFIG_MEDIA_TUNER_XC2028=y
+CONFIG_MEDIA_TUNER_XC5000=y
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# DVB-S (satellite) frontends
+#
+# CONFIG_DVB_CX24110 is not set
+# CONFIG_DVB_CX24123 is not set
+# CONFIG_DVB_MT312 is not set
+# CONFIG_DVB_S5H1420 is not set
+# CONFIG_DVB_STV0299 is not set
+# CONFIG_DVB_TDA8083 is not set
+# CONFIG_DVB_TDA10086 is not set
+# CONFIG_DVB_VES1X93 is not set
+# CONFIG_DVB_TUNER_ITD1000 is not set
+# CONFIG_DVB_TDA826X is not set
+# CONFIG_DVB_TUA6100 is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+# CONFIG_DVB_SP8870 is not set
+# CONFIG_DVB_SP887X is not set
+# CONFIG_DVB_CX22700 is not set
+# CONFIG_DVB_CX22702 is not set
+# CONFIG_DVB_DRX397XD is not set
+# CONFIG_DVB_L64781 is not set
+CONFIG_DVB_TDA1004X=y
+# CONFIG_DVB_NXT6000 is not set
+# CONFIG_DVB_MT352 is not set
+# CONFIG_DVB_ZL10353 is not set
+# CONFIG_DVB_DIB3000MB is not set
+# CONFIG_DVB_DIB3000MC is not set
+# CONFIG_DVB_DIB7000M is not set
+# CONFIG_DVB_DIB7000P is not set
+# CONFIG_DVB_TDA10048 is not set
+
+#
+# DVB-C (cable) frontends
+#
+# CONFIG_DVB_VES1820 is not set
+# CONFIG_DVB_TDA10021 is not set
+# CONFIG_DVB_TDA10023 is not set
+# CONFIG_DVB_STV0297 is not set
+
+#
+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
+#
+# CONFIG_DVB_NXT200X is not set
+# CONFIG_DVB_OR51211 is not set
+# CONFIG_DVB_OR51132 is not set
+# CONFIG_DVB_BCM3510 is not set
+# CONFIG_DVB_LGDT330X is not set
+# CONFIG_DVB_S5H1409 is not set
+# CONFIG_DVB_AU8522 is not set
+# CONFIG_DVB_S5H1411 is not set
+
+#
+# Digital terrestrial only tuners/PLL
+#
+# CONFIG_DVB_PLL is not set
+# CONFIG_DVB_TUNER_DIB0070 is not set
+
+#
+# SEC control devices for DVB-S
+#
+# CONFIG_DVB_LNBP21 is not set
+# CONFIG_DVB_ISL6405 is not set
+# CONFIG_DVB_ISL6421 is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
+# CONFIG_LOGO is not set
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+# CONFIG_SND_DEBUG_VERBOSE is not set
+# CONFIG_SND_PCM_XRUN_DEBUG is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_MIPS=y
+# CONFIG_SND_SOC is not set
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+CONFIG_NLS_CODEPAGE_932=m
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=m
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_KERNEL_TESTS is not set
+CONFIG_CMDLINE=""
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_PRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/mips/emma/Kconfig b/arch/mips/emma/Kconfig
new file mode 100644 (file)
index 0000000..9669c72
--- /dev/null
@@ -0,0 +1,29 @@
+choice
+       prompt "Machine type"
+       depends on MACH_EMMA
+       default NEC_MARKEINS
+
+config NEC_MARKEINS
+       bool "NEC EMMA2RH Mark-eins board"
+       select SOC_EMMA2RH
+       select HW_HAS_PCI
+       help
+         This enables support for the NEC Electronics Mark-eins boards.
+
+endchoice
+
+config SOC_EMMA2RH
+       bool
+       select SOC_EMMA
+       select SYS_HAS_CPU_R5500
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select SYS_SUPPORTS_64BIT_KERNEL
+
+config SOC_EMMA
+       bool
+       select CEVT_R4K
+       select CSRC_R4K
+       select DMA_NONCOHERENT
+       select IRQ_CPU
+       select SWAP_IO_SPACE
+       select SYS_SUPPORTS_BIG_ENDIAN
similarity index 88%
rename from arch/mips/emma2rh/common/Makefile
rename to arch/mips/emma/common/Makefile
index 859121b3867d4097879b1db4b16619dfac6f0670..c392d28c1ef1b652fc8c229337a175816f871895 100644 (file)
@@ -10,4 +10,4 @@
 #  (at your option) any later version.
 #
 
-obj-$(CONFIG_MARKEINS) += irq.o irq_emma2rh.o prom.o
+obj-$(CONFIG_NEC_MARKEINS)     += prom.o
similarity index 95%
rename from arch/mips/emma2rh/common/prom.c
rename to arch/mips/emma/common/prom.c
index e14a2e3d8842e0a2704fb4a548a12b522cf15c49..120f53fbdb4583d3019f7a2af10a3ca8fe220a80 100644 (file)
 
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 const char *get_system_type(void)
 {
-#if defined(CONFIG_MARKEINS)
+#ifdef CONFIG_NEC_MARKEINS
        return "NEC EMMA2RH Mark-eins";
 #else
 #error  Unknown NEC board
@@ -60,7 +60,7 @@ void __init prom_init(void)
                strcat(arcs_cmdline, " ");
        }
 
-#if defined(CONFIG_MARKEINS)
+#ifdef CONFIG_NEC_MARKEINS
        add_memory_region(0, EMMA2RH_RAM_SIZE, BOOT_MEM_RAM);
 #else
 #error  Unknown NEC board
similarity index 85%
rename from arch/mips/emma2rh/markeins/Makefile
rename to arch/mips/emma/markeins/Makefile
index 14fc268b175c02c986ce81ab9c0a2256bbea09fe..16e0017ba91914b1236497598d36fb18154e4157 100644 (file)
@@ -10,4 +10,4 @@
 #  (at your option) any later version.
 #
 
-obj-$(CONFIG_MARKEINS) += irq.o irq_markeins.o setup.o led.o platform.o
+obj-$(CONFIG_NEC_MARKEINS) += irq.o setup.o led.o platform.o
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c
new file mode 100644 (file)
index 0000000..c2583ec
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ *  arch/mips/emma2rh/markeins/irq.c
+ *      This file defines the irq handler for EMMA2RH.
+ *
+ *  Copyright (C) NEC Electronics Corporation 2004-2006
+ *
+ *  This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c
+ *
+ *     Copyright 2001 MontaVista Software Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/delay.h>
+
+#include <asm/irq_cpu.h>
+#include <asm/system.h>
+#include <asm/mipsregs.h>
+#include <asm/addrspace.h>
+#include <asm/bootinfo.h>
+
+#include <asm/emma/emma2rh.h>
+
+static void emma2rh_irq_enable(unsigned int irq)
+{
+       u32 reg_value;
+       u32 reg_bitmask;
+       u32 reg_index;
+
+       irq -= EMMA2RH_IRQ_BASE;
+
+       reg_index = EMMA2RH_BHIF_INT_EN_0 +
+                   (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0) * (irq / 32);
+       reg_value = emma2rh_in32(reg_index);
+       reg_bitmask = 0x1 << (irq % 32);
+       emma2rh_out32(reg_index, reg_value | reg_bitmask);
+}
+
+static void emma2rh_irq_disable(unsigned int irq)
+{
+       u32 reg_value;
+       u32 reg_bitmask;
+       u32 reg_index;
+
+       irq -= EMMA2RH_IRQ_BASE;
+
+       reg_index = EMMA2RH_BHIF_INT_EN_0 +
+                   (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0) * (irq / 32);
+       reg_value = emma2rh_in32(reg_index);
+       reg_bitmask = 0x1 << (irq % 32);
+       emma2rh_out32(reg_index, reg_value & ~reg_bitmask);
+}
+
+struct irq_chip emma2rh_irq_controller = {
+       .name = "emma2rh_irq",
+       .ack = emma2rh_irq_disable,
+       .mask = emma2rh_irq_disable,
+       .mask_ack = emma2rh_irq_disable,
+       .unmask = emma2rh_irq_enable,
+};
+
+void emma2rh_irq_init(void)
+{
+       u32 i;
+
+       for (i = 0; i < NUM_EMMA2RH_IRQ; i++)
+               set_irq_chip_and_handler(EMMA2RH_IRQ_BASE + i,
+                                        &emma2rh_irq_controller,
+                                        handle_level_irq);
+}
+
+static void emma2rh_sw_irq_enable(unsigned int irq)
+{
+       u32 reg;
+
+       irq -= EMMA2RH_SW_IRQ_BASE;
+
+       reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
+       reg |= 1 << irq;
+       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg);
+}
+
+static void emma2rh_sw_irq_disable(unsigned int irq)
+{
+       u32 reg;
+
+       irq -= EMMA2RH_SW_IRQ_BASE;
+
+       reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
+       reg &= ~(1 << irq);
+       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg);
+}
+
+struct irq_chip emma2rh_sw_irq_controller = {
+       .name = "emma2rh_sw_irq",
+       .ack = emma2rh_sw_irq_disable,
+       .mask = emma2rh_sw_irq_disable,
+       .mask_ack = emma2rh_sw_irq_disable,
+       .unmask = emma2rh_sw_irq_enable,
+};
+
+void emma2rh_sw_irq_init(void)
+{
+       u32 i;
+
+       for (i = 0; i < NUM_EMMA2RH_IRQ_SW; i++)
+               set_irq_chip_and_handler(EMMA2RH_SW_IRQ_BASE + i,
+                                        &emma2rh_sw_irq_controller,
+                                        handle_level_irq);
+}
+
+static void emma2rh_gpio_irq_enable(unsigned int irq)
+{
+       u32 reg;
+
+       irq -= EMMA2RH_GPIO_IRQ_BASE;
+
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+       reg |= 1 << irq;
+       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
+}
+
+static void emma2rh_gpio_irq_disable(unsigned int irq)
+{
+       u32 reg;
+
+       irq -= EMMA2RH_GPIO_IRQ_BASE;
+
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+       reg &= ~(1 << irq);
+       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
+}
+
+static void emma2rh_gpio_irq_ack(unsigned int irq)
+{
+       u32 reg;
+
+       irq -= EMMA2RH_GPIO_IRQ_BASE;
+       emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq));
+
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+       reg &= ~(1 << irq);
+       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
+}
+
+static void emma2rh_gpio_irq_end(unsigned int irq)
+{
+       u32 reg;
+
+       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
+
+               irq -= EMMA2RH_GPIO_IRQ_BASE;
+
+               reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+               reg |= 1 << irq;
+               emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
+       }
+}
+
+struct irq_chip emma2rh_gpio_irq_controller = {
+       .name = "emma2rh_gpio_irq",
+       .ack = emma2rh_gpio_irq_ack,
+       .mask = emma2rh_gpio_irq_disable,
+       .mask_ack = emma2rh_gpio_irq_ack,
+       .unmask = emma2rh_gpio_irq_enable,
+       .end = emma2rh_gpio_irq_end,
+};
+
+void emma2rh_gpio_irq_init(void)
+{
+       u32 i;
+
+       for (i = 0; i < NUM_EMMA2RH_IRQ_GPIO; i++)
+               set_irq_chip(EMMA2RH_GPIO_IRQ_BASE + i,
+                            &emma2rh_gpio_irq_controller);
+}
+
+static struct irqaction irq_cascade = {
+          .handler = no_action,
+          .flags = 0,
+          .mask = CPU_MASK_NONE,
+          .name = "cascade",
+          .dev_id = NULL,
+          .next = NULL,
+};
+
+/*
+ * the first level int-handler will jump here if it is a emma2rh irq
+ */
+void emma2rh_irq_dispatch(void)
+{
+       u32 intStatus;
+       u32 bitmask;
+       u32 i;
+
+       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_0) &
+                   emma2rh_in32(EMMA2RH_BHIF_INT_EN_0);
+
+#ifdef EMMA2RH_SW_CASCADE
+       if (intStatus &
+           (1 << ((EMMA2RH_SW_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
+               u32 swIntStatus;
+               swIntStatus = emma2rh_in32(EMMA2RH_BHIF_SW_INT)
+                   & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
+               for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
+                       if (swIntStatus & bitmask) {
+                               do_IRQ(EMMA2RH_SW_IRQ_BASE + i);
+                               return;
+                       }
+               }
+       }
+#endif
+
+       for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
+               if (intStatus & bitmask) {
+                       do_IRQ(EMMA2RH_IRQ_BASE + i);
+                       return;
+               }
+       }
+
+       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_1) &
+                   emma2rh_in32(EMMA2RH_BHIF_INT_EN_1);
+
+#ifdef EMMA2RH_GPIO_CASCADE
+       if (intStatus &
+           (1 << ((EMMA2RH_GPIO_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
+               u32 gpioIntStatus;
+               gpioIntStatus = emma2rh_in32(EMMA2RH_GPIO_INT_ST)
+                   & emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+               for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
+                       if (gpioIntStatus & bitmask) {
+                               do_IRQ(EMMA2RH_GPIO_IRQ_BASE + i);
+                               return;
+                       }
+               }
+       }
+#endif
+
+       for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) {
+               if (intStatus & bitmask) {
+                       do_IRQ(EMMA2RH_IRQ_BASE + i);
+                       return;
+               }
+       }
+
+       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_2) &
+                   emma2rh_in32(EMMA2RH_BHIF_INT_EN_2);
+
+       for (i = 64, bitmask = 1; i < 96; i++, bitmask <<= 1) {
+               if (intStatus & bitmask) {
+                       do_IRQ(EMMA2RH_IRQ_BASE + i);
+                       return;
+               }
+       }
+}
+
+void __init arch_init_irq(void)
+{
+       u32 reg;
+
+       /* by default, interrupts are disabled. */
+       emma2rh_out32(EMMA2RH_BHIF_INT_EN_0, 0);
+       emma2rh_out32(EMMA2RH_BHIF_INT_EN_1, 0);
+       emma2rh_out32(EMMA2RH_BHIF_INT_EN_2, 0);
+       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_0, 0);
+       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_1, 0);
+       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_2, 0);
+       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, 0);
+
+       clear_c0_status(0xff00);
+       set_c0_status(0x0400);
+
+#define GPIO_PCI (0xf<<15)
+       /* setup GPIO interrupt for PCI interface */
+       /* direction input */
+       reg = emma2rh_in32(EMMA2RH_GPIO_DIR);
+       emma2rh_out32(EMMA2RH_GPIO_DIR, reg & ~GPIO_PCI);
+       /* disable interrupt */
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
+       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg & ~GPIO_PCI);
+       /* level triggerd */
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MODE);
+       emma2rh_out32(EMMA2RH_GPIO_INT_MODE, reg | GPIO_PCI);
+       reg = emma2rh_in32(EMMA2RH_GPIO_INT_CND_A);
+       emma2rh_out32(EMMA2RH_GPIO_INT_CND_A, reg & (~GPIO_PCI));
+       /* interrupt clear */
+       emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~GPIO_PCI);
+
+       /* init all controllers */
+       emma2rh_irq_init();
+       emma2rh_sw_irq_init();
+       emma2rh_gpio_irq_init();
+       mips_cpu_irq_init();
+
+       /* setup cascade interrupts */
+       setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
+       setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade);
+       setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade);
+}
+
+asmlinkage void plat_irq_dispatch(void)
+{
+        unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
+
+       if (pending & STATUSF_IP7)
+               do_IRQ(CPU_IRQ_BASE + 7);
+       else if (pending & STATUSF_IP2)
+               emma2rh_irq_dispatch();
+       else if (pending & STATUSF_IP1)
+               do_IRQ(CPU_IRQ_BASE + 1);
+       else if (pending & STATUSF_IP0)
+               do_IRQ(CPU_IRQ_BASE + 0);
+       else
+               spurious_interrupt();
+}
similarity index 97%
rename from arch/mips/emma2rh/markeins/led.c
rename to arch/mips/emma/markeins/led.c
index b65254c1bfe9446e169e20d7a39f14c55e8ca362..377a181b6561d630197bec4a42a2eff460f8e3f1 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/string.h>
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 const unsigned long clear = 0x20202020;
 
similarity index 99%
rename from arch/mips/emma2rh/markeins/platform.c
rename to arch/mips/emma/markeins/platform.c
index fb9cda253ab0806f67ad6a0245c406e3d1608737..88e87f6b344297cb31081a99e316e5ea3cfcb088 100644 (file)
@@ -36,7 +36,7 @@
 #include <asm/reboot.h>
 #include <asm/traps.h>
 
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 
 #define I2C_EMMA2RH "emma2rh-iic" /* must be in sync with IIC driver */
similarity index 99%
rename from arch/mips/emma2rh/markeins/setup.c
rename to arch/mips/emma/markeins/setup.c
index b6a23ad539f8afb99034a7ad63a31be223f555eb..67f456500084c63f78568e986922d17ab9d42bb7 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/time.h>
 #include <asm/reboot.h>
 
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 #define        USE_CPU_COUNTER_TIMER   /* whether we use cpu counter */
 
diff --git a/arch/mips/emma2rh/common/irq.c b/arch/mips/emma2rh/common/irq.c
deleted file mode 100644 (file)
index 91cbd95..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *  arch/mips/emma2rh/common/irq.c
- *      This file is common irq dispatcher.
- *
- *  Copyright (C) NEC Electronics Corporation 2005-2006
- *
- *  This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c
- *
- *     Copyright 2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/types.h>
-
-#include <asm/system.h>
-#include <asm/mipsregs.h>
-#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
-
-#include <asm/emma2rh/emma2rh.h>
-
-/*
- * the first level int-handler will jump here if it is a emma2rh irq
- */
-void emma2rh_irq_dispatch(void)
-{
-       u32 intStatus;
-       u32 bitmask;
-       u32 i;
-
-       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_0)
-           & emma2rh_in32(EMMA2RH_BHIF_INT_EN_0);
-
-#ifdef EMMA2RH_SW_CASCADE
-       if (intStatus &
-           (1 << ((EMMA2RH_SW_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
-               u32 swIntStatus;
-               swIntStatus = emma2rh_in32(EMMA2RH_BHIF_SW_INT)
-                   & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
-               for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
-                       if (swIntStatus & bitmask) {
-                               do_IRQ(EMMA2RH_SW_IRQ_BASE + i);
-                               return;
-                       }
-               }
-       }
-#endif
-
-       for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
-               if (intStatus & bitmask) {
-                       do_IRQ(EMMA2RH_IRQ_BASE + i);
-                       return;
-               }
-       }
-
-       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_1)
-           & emma2rh_in32(EMMA2RH_BHIF_INT_EN_1);
-
-#ifdef EMMA2RH_GPIO_CASCADE
-       if (intStatus &
-           (1 << ((EMMA2RH_GPIO_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) {
-               u32 gpioIntStatus;
-               gpioIntStatus = emma2rh_in32(EMMA2RH_GPIO_INT_ST)
-                   & emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
-               for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
-                       if (gpioIntStatus & bitmask) {
-                               do_IRQ(EMMA2RH_GPIO_IRQ_BASE + i);
-                               return;
-                       }
-               }
-       }
-#endif
-
-       for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) {
-               if (intStatus & bitmask) {
-                       do_IRQ(EMMA2RH_IRQ_BASE + i);
-                       return;
-               }
-       }
-
-       intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_2)
-           & emma2rh_in32(EMMA2RH_BHIF_INT_EN_2);
-
-       for (i = 64, bitmask = 1; i < 96; i++, bitmask <<= 1) {
-               if (intStatus & bitmask) {
-                       do_IRQ(EMMA2RH_IRQ_BASE + i);
-                       return;
-               }
-       }
-}
diff --git a/arch/mips/emma2rh/common/irq_emma2rh.c b/arch/mips/emma2rh/common/irq_emma2rh.c
deleted file mode 100644 (file)
index 96df37b..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- *  arch/mips/emma2rh/common/irq_emma2rh.c
- *      This file defines the irq handler for EMMA2RH.
- *
- *  Copyright (C) NEC Electronics Corporation 2005-2006
- *
- *  This file is based on the arch/mips/ddb5xxx/ddb5477/irq_5477.c
- *
- *     Copyright 2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- * EMMA2RH defines 64 IRQs.
- *
- * This file exports one function:
- *     emma2rh_irq_init(u32 irq_base);
- */
-
-#include <linux/interrupt.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-
-#include <asm/debug.h>
-
-#include <asm/emma2rh/emma2rh.h>
-
-/* number of total irqs supported by EMMA2RH */
-#define        NUM_EMMA2RH_IRQ         96
-
-static int emma2rh_irq_base = -1;
-
-void ll_emma2rh_irq_enable(int);
-void ll_emma2rh_irq_disable(int);
-
-static void emma2rh_irq_enable(unsigned int irq)
-{
-       ll_emma2rh_irq_enable(irq - emma2rh_irq_base);
-}
-
-static void emma2rh_irq_disable(unsigned int irq)
-{
-       ll_emma2rh_irq_disable(irq - emma2rh_irq_base);
-}
-
-struct irq_chip emma2rh_irq_controller = {
-       .name = "emma2rh_irq",
-       .ack = emma2rh_irq_disable,
-       .mask = emma2rh_irq_disable,
-       .mask_ack = emma2rh_irq_disable,
-       .unmask = emma2rh_irq_enable,
-};
-
-void emma2rh_irq_init(u32 irq_base)
-{
-       u32 i;
-
-       for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ; i++)
-               set_irq_chip_and_handler(i, &emma2rh_irq_controller,
-                                        handle_level_irq);
-
-       emma2rh_irq_base = irq_base;
-}
-
-void ll_emma2rh_irq_enable(int emma2rh_irq)
-{
-       u32 reg_value;
-       u32 reg_bitmask;
-       u32 reg_index;
-
-       reg_index = EMMA2RH_BHIF_INT_EN_0
-           + (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0)
-           * (emma2rh_irq / 32);
-       reg_value = emma2rh_in32(reg_index);
-       reg_bitmask = 0x1 << (emma2rh_irq % 32);
-       db_assert((reg_value & reg_bitmask) == 0);
-       emma2rh_out32(reg_index, reg_value | reg_bitmask);
-}
-
-void ll_emma2rh_irq_disable(int emma2rh_irq)
-{
-       u32 reg_value;
-       u32 reg_bitmask;
-       u32 reg_index;
-
-       reg_index = EMMA2RH_BHIF_INT_EN_0
-           + (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0)
-           * (emma2rh_irq / 32);
-       reg_value = emma2rh_in32(reg_index);
-       reg_bitmask = 0x1 << (emma2rh_irq % 32);
-       db_assert((reg_value & reg_bitmask) != 0);
-       emma2rh_out32(reg_index, reg_value & ~reg_bitmask);
-}
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c
deleted file mode 100644 (file)
index 6bcf6a0..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- *  arch/mips/emma2rh/markeins/irq.c
- *      This file defines the irq handler for EMMA2RH.
- *
- *  Copyright (C) NEC Electronics Corporation 2004-2006
- *
- *  This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c
- *
- *     Copyright 2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-#include <linux/delay.h>
-
-#include <asm/irq_cpu.h>
-#include <asm/system.h>
-#include <asm/mipsregs.h>
-#include <asm/debug.h>
-#include <asm/addrspace.h>
-#include <asm/bootinfo.h>
-
-#include <asm/emma2rh/emma2rh.h>
-
-/*
- * IRQ mapping
- *
- *  0-7: 8 CPU interrupts
- *     0 -     software interrupt 0
- *     1 -     software interrupt 1
- *     2 -     most Vrc5477 interrupts are routed to this pin
- *     3 -     (optional) some other interrupts routed to this pin for debugg
- *     4 -     not used
- *     5 -     not used
- *     6 -     not used
- *     7 -     cpu timer (used by default)
- *
- */
-
-extern void emma2rh_sw_irq_init(u32 base);
-extern void emma2rh_gpio_irq_init(u32 base);
-extern void emma2rh_irq_init(u32 base);
-extern void emma2rh_irq_dispatch(void);
-
-static struct irqaction irq_cascade = {
-          .handler = no_action,
-          .flags = 0,
-          .mask = CPU_MASK_NONE,
-          .name = "cascade",
-          .dev_id = NULL,
-          .next = NULL,
-};
-
-void __init arch_init_irq(void)
-{
-       u32 reg;
-
-       db_run(printk("markeins_irq_setup invoked.\n"));
-
-       /* by default, interrupts are disabled. */
-       emma2rh_out32(EMMA2RH_BHIF_INT_EN_0, 0);
-       emma2rh_out32(EMMA2RH_BHIF_INT_EN_1, 0);
-       emma2rh_out32(EMMA2RH_BHIF_INT_EN_2, 0);
-       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_0, 0);
-       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_1, 0);
-       emma2rh_out32(EMMA2RH_BHIF_INT1_EN_2, 0);
-       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, 0);
-
-       clear_c0_status(0xff00);
-       set_c0_status(0x0400);
-
-#define GPIO_PCI (0xf<<15)
-       /* setup GPIO interrupt for PCI interface */
-       /* direction input */
-       reg = emma2rh_in32(EMMA2RH_GPIO_DIR);
-       emma2rh_out32(EMMA2RH_GPIO_DIR, reg & ~GPIO_PCI);
-       /* disable interrupt */
-       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
-       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg & ~GPIO_PCI);
-       /* level triggerd */
-       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MODE);
-       emma2rh_out32(EMMA2RH_GPIO_INT_MODE, reg | GPIO_PCI);
-       reg = emma2rh_in32(EMMA2RH_GPIO_INT_CND_A);
-       emma2rh_out32(EMMA2RH_GPIO_INT_CND_A, reg & (~GPIO_PCI));
-       /* interrupt clear */
-       emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~GPIO_PCI);
-
-       /* init all controllers */
-       emma2rh_irq_init(EMMA2RH_IRQ_BASE);
-       emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE);
-       emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE);
-       mips_cpu_irq_init();
-
-       /* setup cascade interrupts */
-       setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
-       setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade);
-       setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade);
-}
-
-asmlinkage void plat_irq_dispatch(void)
-{
-        unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
-
-       if (pending & STATUSF_IP7)
-               do_IRQ(CPU_IRQ_BASE + 7);
-       else if (pending & STATUSF_IP2)
-               emma2rh_irq_dispatch();
-       else if (pending & STATUSF_IP1)
-               do_IRQ(CPU_IRQ_BASE + 1);
-       else if (pending & STATUSF_IP0)
-               do_IRQ(CPU_IRQ_BASE + 0);
-       else
-               spurious_interrupt();
-}
-
-
diff --git a/arch/mips/emma2rh/markeins/irq_markeins.c b/arch/mips/emma2rh/markeins/irq_markeins.c
deleted file mode 100644 (file)
index fba5c15..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *  arch/mips/emma2rh/markeins/irq_markeins.c
- *      This file defines the irq handler for Mark-eins.
- *
- *  Copyright (C) NEC Electronics Corporation 2004-2006
- *
- *  This file is based on the arch/mips/ddb5xxx/ddb5477/irq_5477.c
- *
- *     Copyright 2001 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-
-#include <asm/debug.h>
-#include <asm/emma2rh/emma2rh.h>
-
-static int emma2rh_sw_irq_base = -1;
-static int emma2rh_gpio_irq_base = -1;
-
-void ll_emma2rh_sw_irq_enable(int reg);
-void ll_emma2rh_sw_irq_disable(int reg);
-void ll_emma2rh_gpio_irq_enable(int reg);
-void ll_emma2rh_gpio_irq_disable(int reg);
-
-static void emma2rh_sw_irq_enable(unsigned int irq)
-{
-       ll_emma2rh_sw_irq_enable(irq - emma2rh_sw_irq_base);
-}
-
-static void emma2rh_sw_irq_disable(unsigned int irq)
-{
-       ll_emma2rh_sw_irq_disable(irq - emma2rh_sw_irq_base);
-}
-
-struct irq_chip emma2rh_sw_irq_controller = {
-       .name = "emma2rh_sw_irq",
-       .ack = emma2rh_sw_irq_disable,
-       .mask = emma2rh_sw_irq_disable,
-       .mask_ack = emma2rh_sw_irq_disable,
-       .unmask = emma2rh_sw_irq_enable,
-};
-
-void emma2rh_sw_irq_init(u32 irq_base)
-{
-       u32 i;
-
-       for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ_SW; i++)
-               set_irq_chip_and_handler(i, &emma2rh_sw_irq_controller,
-                                        handle_level_irq);
-
-       emma2rh_sw_irq_base = irq_base;
-}
-
-void ll_emma2rh_sw_irq_enable(int irq)
-{
-       u32 reg;
-
-       db_assert(irq >= 0);
-       db_assert(irq < NUM_EMMA2RH_IRQ_SW);
-
-       reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
-       reg |= 1 << irq;
-       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg);
-}
-
-void ll_emma2rh_sw_irq_disable(int irq)
-{
-       u32 reg;
-
-       db_assert(irq >= 0);
-       db_assert(irq < 32);
-
-       reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
-       reg &= ~(1 << irq);
-       emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg);
-}
-
-static void emma2rh_gpio_irq_enable(unsigned int irq)
-{
-       ll_emma2rh_gpio_irq_enable(irq - emma2rh_gpio_irq_base);
-}
-
-static void emma2rh_gpio_irq_disable(unsigned int irq)
-{
-       ll_emma2rh_gpio_irq_disable(irq - emma2rh_gpio_irq_base);
-}
-
-static void emma2rh_gpio_irq_ack(unsigned int irq)
-{
-       irq -= emma2rh_gpio_irq_base;
-       emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq));
-       ll_emma2rh_gpio_irq_disable(irq);
-}
-
-static void emma2rh_gpio_irq_end(unsigned int irq)
-{
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               ll_emma2rh_gpio_irq_enable(irq - emma2rh_gpio_irq_base);
-}
-
-struct irq_chip emma2rh_gpio_irq_controller = {
-       .name = "emma2rh_gpio_irq",
-       .ack = emma2rh_gpio_irq_ack,
-       .mask = emma2rh_gpio_irq_disable,
-       .mask_ack = emma2rh_gpio_irq_ack,
-       .unmask = emma2rh_gpio_irq_enable,
-       .end = emma2rh_gpio_irq_end,
-};
-
-void emma2rh_gpio_irq_init(u32 irq_base)
-{
-       u32 i;
-
-       for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ_GPIO; i++)
-               set_irq_chip(i, &emma2rh_gpio_irq_controller);
-
-       emma2rh_gpio_irq_base = irq_base;
-}
-
-void ll_emma2rh_gpio_irq_enable(int irq)
-{
-       u32 reg;
-
-       db_assert(irq >= 0);
-       db_assert(irq < NUM_EMMA2RH_IRQ_GPIO);
-
-       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
-       reg |= 1 << irq;
-       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
-}
-
-void ll_emma2rh_gpio_irq_disable(int irq)
-{
-       u32 reg;
-
-       db_assert(irq >= 0);
-       db_assert(irq < NUM_EMMA2RH_IRQ_GPIO);
-
-       reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
-       reg &= ~(1 << irq);
-       emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg);
-}
similarity index 97%
rename from arch/mips/include/asm/emma2rh/emma2rh.h
rename to arch/mips/include/asm/emma/emma2rh.h
index 6a1af0af51e3b221e57ec02761d865914677afe1..30aea91de626122d6f27af5195c504deb56988b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  include/asm-mips/emma2rh/emma2rh.h
+ *  arch/mips/include/asm/emma/emma2rh.h
  *      This file is EMMA2RH common header.
  *
  *  Copyright (C) NEC Electronics Corporation 2005-2006
@@ -21,8 +21,8 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_EMMA2RH_EMMA2RH_H
-#define __ASM_EMMA2RH_EMMA2RH_H
+#ifndef __ASM_EMMA_EMMA2RH_H
+#define __ASM_EMMA_EMMA2RH_H
 
 #include <irq.h>
 
@@ -206,7 +206,6 @@ static inline void emma2rh_out32(u32 offset, u32 val)
 static inline u32 emma2rh_in32(u32 offset)
 {
        u32 val = *(volatile u32 *)(EMMA2RH_BASE | offset);
-       emma2rh_sync();
        return val;
 }
 
@@ -219,7 +218,6 @@ static inline void emma2rh_out16(u32 offset, u16 val)
 static inline u16 emma2rh_in16(u32 offset)
 {
        u16 val = *(volatile u16 *)(EMMA2RH_BASE | offset);
-       emma2rh_sync();
        return val;
 }
 
@@ -232,7 +230,6 @@ static inline void emma2rh_out8(u32 offset, u8 val)
 static inline u8 emma2rh_in8(u32 offset)
 {
        u8 val = *(volatile u8 *)(EMMA2RH_BASE | offset);
-       emma2rh_sync();
        return val;
 }
 
@@ -324,10 +321,10 @@ static inline u8 emma2rh_in8(u32 offset)
 /*
  * include the board dependent part
  */
-#if defined(CONFIG_MARKEINS)
-#include <asm/emma2rh/markeins.h>
+#ifdef CONFIG_NEC_MARKEINS
+#include <asm/emma/markeins.h>
 #else
 #error "Unknown EMMA2RH board!"
 #endif
 
-#endif /* __ASM_EMMA2RH_EMMA2RH_H */
+#endif /* __ASM_EMMA_EMMA2RH_H */
diff --git a/arch/mips/include/asm/mach-lemote/pci.h b/arch/mips/include/asm/mach-lemote/pci.h
new file mode 100644 (file)
index 0000000..ea6aa14
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2008 Zhang Le <r0bertz@gentoo.org>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
+ * 02139, USA.
+ */
+
+#ifndef _LEMOTE_PCI_H_
+#define _LEMOTE_PCI_H_
+
+#define LOONGSON2E_PCI_MEM_START       0x14000000UL
+#define LOONGSON2E_PCI_MEM_END         0x1fffffffUL
+#define LOONGSON2E_PCI_IO_START                0x00004000UL
+#define LOONGSON2E_IO_PORT_BASE                0x1fd00000UL
+
+#endif /* !_LEMOTE_PCI_H_ */
diff --git a/arch/mips/include/asm/mach-pnx833x/gpio.h b/arch/mips/include/asm/mach-pnx833x/gpio.h
new file mode 100644 (file)
index 0000000..8de0eb9
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ *  gpio.h: GPIO Support for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __ASM_MIPS_MACH_PNX833X_GPIO_H
+#define __ASM_MIPS_MACH_PNX833X_GPIO_H
+
+/* BIG FAT WARNING: races danger!
+   No protections exist here. Current users are only early init code,
+   when locking is not needed because no cuncurency yet exists there,
+   and GPIO IRQ dispatcher, which does locking.
+   However, if many uses will ever happen, proper locking will be needed
+   - including locking between different uses
+*/
+
+#include "pnx833x.h"
+
+#define SET_REG_BIT(reg, bit)          do { (reg |= (1 << (bit))); } while (0)
+#define CLEAR_REG_BIT(reg, bit)                do { (reg &= ~(1 << (bit))); } while (0)
+
+/* Initialize GPIO to a known state */
+static inline void pnx833x_gpio_init(void)
+{
+       PNX833X_PIO_DIR = 0;
+       PNX833X_PIO_DIR2 = 0;
+       PNX833X_PIO_SEL = 0;
+       PNX833X_PIO_SEL2 = 0;
+       PNX833X_PIO_INT_EDGE = 0;
+       PNX833X_PIO_INT_HI = 0;
+       PNX833X_PIO_INT_LO = 0;
+
+       /* clear any GPIO interrupt requests */
+       PNX833X_PIO_INT_CLEAR = 0xffff;
+       PNX833X_PIO_INT_CLEAR = 0;
+       PNX833X_PIO_INT_ENABLE = 0;
+}
+
+/* Select GPIO direction for a pin */
+static inline void pnx833x_gpio_select_input(unsigned int pin)
+{
+       if (pin < 32)
+               CLEAR_REG_BIT(PNX833X_PIO_DIR, pin);
+       else
+               CLEAR_REG_BIT(PNX833X_PIO_DIR2, pin & 31);
+}
+static inline void pnx833x_gpio_select_output(unsigned int pin)
+{
+       if (pin < 32)
+               SET_REG_BIT(PNX833X_PIO_DIR, pin);
+       else
+               SET_REG_BIT(PNX833X_PIO_DIR2, pin & 31);
+}
+
+/* Select GPIO or alternate function for a pin */
+static inline void pnx833x_gpio_select_function_io(unsigned int pin)
+{
+       if (pin < 32)
+               CLEAR_REG_BIT(PNX833X_PIO_SEL, pin);
+       else
+               CLEAR_REG_BIT(PNX833X_PIO_SEL2, pin & 31);
+}
+static inline void pnx833x_gpio_select_function_alt(unsigned int pin)
+{
+       if (pin < 32)
+               SET_REG_BIT(PNX833X_PIO_SEL, pin);
+       else
+               SET_REG_BIT(PNX833X_PIO_SEL2, pin & 31);
+}
+
+/* Read GPIO pin */
+static inline int pnx833x_gpio_read(unsigned int pin)
+{
+       if (pin < 32)
+               return (PNX833X_PIO_IN >> pin) & 1;
+       else
+               return (PNX833X_PIO_IN2 >> (pin & 31)) & 1;
+}
+
+/* Write GPIO pin */
+static inline void pnx833x_gpio_write(unsigned int val, unsigned int pin)
+{
+       if (pin < 32) {
+               if (val)
+                       SET_REG_BIT(PNX833X_PIO_OUT, pin);
+               else
+                       CLEAR_REG_BIT(PNX833X_PIO_OUT, pin);
+       } else {
+               if (val)
+                       SET_REG_BIT(PNX833X_PIO_OUT2, pin & 31);
+               else
+                       CLEAR_REG_BIT(PNX833X_PIO_OUT2, pin & 31);
+       }
+}
+
+/* Configure GPIO interrupt */
+#define GPIO_INT_NONE          0
+#define GPIO_INT_LEVEL_LOW     1
+#define GPIO_INT_LEVEL_HIGH    2
+#define GPIO_INT_EDGE_RISING   3
+#define GPIO_INT_EDGE_FALLING  4
+#define GPIO_INT_EDGE_BOTH     5
+static inline void pnx833x_gpio_setup_irq(int when, unsigned int pin)
+{
+       switch (when) {
+       case GPIO_INT_LEVEL_LOW:
+               CLEAR_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       case GPIO_INT_LEVEL_HIGH:
+               CLEAR_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       case GPIO_INT_EDGE_RISING:
+               SET_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       case GPIO_INT_EDGE_FALLING:
+               SET_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       case GPIO_INT_EDGE_BOTH:
+               SET_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               SET_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       default:
+               CLEAR_REG_BIT(PNX833X_PIO_INT_EDGE, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_HI, pin);
+               CLEAR_REG_BIT(PNX833X_PIO_INT_LO, pin);
+               break;
+       }
+}
+
+/* Enable/disable GPIO interrupt */
+static inline void pnx833x_gpio_enable_irq(unsigned int pin)
+{
+       SET_REG_BIT(PNX833X_PIO_INT_ENABLE, pin);
+}
+static inline void pnx833x_gpio_disable_irq(unsigned int pin)
+{
+       CLEAR_REG_BIT(PNX833X_PIO_INT_ENABLE, pin);
+}
+
+/* Clear GPIO interrupt request */
+static inline void pnx833x_gpio_clear_irq(unsigned int pin)
+{
+       SET_REG_BIT(PNX833X_PIO_INT_CLEAR, pin);
+       CLEAR_REG_BIT(PNX833X_PIO_INT_CLEAR, pin);
+}
+
+#endif
diff --git a/arch/mips/include/asm/mach-pnx833x/irq-mapping.h b/arch/mips/include/asm/mach-pnx833x/irq-mapping.h
new file mode 100644 (file)
index 0000000..657f089
--- /dev/null
@@ -0,0 +1,126 @@
+
+/*
+ *  irq.h: IRQ mappings for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_MIPS_MACH_PNX833X_IRQ_MAPPING_H
+#define __ASM_MIPS_MACH_PNX833X_IRQ_MAPPING_H
+/*
+ * The "IRQ numbers" are completely virtual.
+ *
+ * In PNX8330/1, we have 48 interrupt lines, numbered from 1 to 48.
+ * Let's use numbers 1..48 for PIC interrupts, number 0 for timer interrupt,
+ * numbers 49..64 for (virtual) GPIO interrupts.
+ *
+ * In PNX8335, we have 57 interrupt lines, numbered from 1 to 57,
+ * connected to PIC, which uses core hardware interrupt 2, and also
+ * a timer interrupt through hardware interrupt 5.
+ * Let's use numbers 1..64 for PIC interrupts, number 0 for timer interrupt,
+ * numbers 65..80 for (virtual) GPIO interrupts.
+ *
+ */
+#include <irq.h>
+
+#define PNX833X_TIMER_IRQ                              (MIPS_CPU_IRQ_BASE + 7)
+
+/* Interrupts supported by PIC */
+#define PNX833X_PIC_I2C0_INT                   (PNX833X_PIC_IRQ_BASE +  1)
+#define PNX833X_PIC_I2C1_INT                   (PNX833X_PIC_IRQ_BASE +  2)
+#define PNX833X_PIC_UART0_INT                  (PNX833X_PIC_IRQ_BASE +  3)
+#define PNX833X_PIC_UART1_INT                  (PNX833X_PIC_IRQ_BASE +  4)
+#define PNX833X_PIC_TS_IN0_DV_INT              (PNX833X_PIC_IRQ_BASE +  5)
+#define PNX833X_PIC_TS_IN0_DMA_INT             (PNX833X_PIC_IRQ_BASE +  6)
+#define PNX833X_PIC_GPIO_INT                   (PNX833X_PIC_IRQ_BASE +  7)
+#define PNX833X_PIC_AUDIO_DEC_INT              (PNX833X_PIC_IRQ_BASE +  8)
+#define PNX833X_PIC_VIDEO_DEC_INT              (PNX833X_PIC_IRQ_BASE +  9)
+#define PNX833X_PIC_CONFIG_INT                 (PNX833X_PIC_IRQ_BASE + 10)
+#define PNX833X_PIC_AOI_INT                            (PNX833X_PIC_IRQ_BASE + 11)
+#define PNX833X_PIC_SYNC_INT                   (PNX833X_PIC_IRQ_BASE + 12)
+#define PNX8330_PIC_SPU_INT                            (PNX833X_PIC_IRQ_BASE + 13)
+#define PNX8335_PIC_SATA_INT                   (PNX833X_PIC_IRQ_BASE + 13)
+#define PNX833X_PIC_OSD_INT                            (PNX833X_PIC_IRQ_BASE + 14)
+#define PNX833X_PIC_DISP1_INT                  (PNX833X_PIC_IRQ_BASE + 15)
+#define PNX833X_PIC_DEINTERLACER_INT   (PNX833X_PIC_IRQ_BASE + 16)
+#define PNX833X_PIC_DISPLAY2_INT               (PNX833X_PIC_IRQ_BASE + 17)
+#define PNX833X_PIC_VC_INT                             (PNX833X_PIC_IRQ_BASE + 18)
+#define PNX833X_PIC_SC_INT                             (PNX833X_PIC_IRQ_BASE + 19)
+#define PNX833X_PIC_IDE_INT                            (PNX833X_PIC_IRQ_BASE + 20)
+#define PNX833X_PIC_IDE_DMA_INT                        (PNX833X_PIC_IRQ_BASE + 21)
+#define PNX833X_PIC_TS_IN1_DV_INT              (PNX833X_PIC_IRQ_BASE + 22)
+#define PNX833X_PIC_TS_IN1_DMA_INT             (PNX833X_PIC_IRQ_BASE + 23)
+#define PNX833X_PIC_SGDX_DMA_INT               (PNX833X_PIC_IRQ_BASE + 24)
+#define PNX833X_PIC_TS_OUT_INT                 (PNX833X_PIC_IRQ_BASE + 25)
+#define PNX833X_PIC_IR_INT                             (PNX833X_PIC_IRQ_BASE + 26)
+#define PNX833X_PIC_VMSP1_INT                  (PNX833X_PIC_IRQ_BASE + 27)
+#define PNX833X_PIC_VMSP2_INT                  (PNX833X_PIC_IRQ_BASE + 28)
+#define PNX833X_PIC_PIBC_INT                   (PNX833X_PIC_IRQ_BASE + 29)
+#define PNX833X_PIC_TS_IN0_TRD_INT             (PNX833X_PIC_IRQ_BASE + 30)
+#define PNX833X_PIC_SGDX_TPD_INT               (PNX833X_PIC_IRQ_BASE + 31)
+#define PNX833X_PIC_USB_INT                            (PNX833X_PIC_IRQ_BASE + 32)
+#define PNX833X_PIC_TS_IN1_TRD_INT             (PNX833X_PIC_IRQ_BASE + 33)
+#define PNX833X_PIC_CLOCK_INT                  (PNX833X_PIC_IRQ_BASE + 34)
+#define PNX833X_PIC_SGDX_PARSER_INT            (PNX833X_PIC_IRQ_BASE + 35)
+#define PNX833X_PIC_VMSP_DMA_INT               (PNX833X_PIC_IRQ_BASE + 36)
+
+#if defined(CONFIG_SOC_PNX8335)
+#define PNX8335_PIC_MIU_INT                                    (PNX833X_PIC_IRQ_BASE + 37)
+#define PNX8335_PIC_AVCHIP_IRQ_INT                     (PNX833X_PIC_IRQ_BASE + 38)
+#define PNX8335_PIC_SYNC_HD_INT                                (PNX833X_PIC_IRQ_BASE + 39)
+#define PNX8335_PIC_DISP_HD_INT                                (PNX833X_PIC_IRQ_BASE + 40)
+#define PNX8335_PIC_DISP_SCALER_INT                    (PNX833X_PIC_IRQ_BASE + 41)
+#define PNX8335_PIC_OSD_HD1_INT                                (PNX833X_PIC_IRQ_BASE + 42)
+#define PNX8335_PIC_DTL_WRITER_Y_INT           (PNX833X_PIC_IRQ_BASE + 43)
+#define PNX8335_PIC_DTL_WRITER_C_INT           (PNX833X_PIC_IRQ_BASE + 44)
+#define PNX8335_PIC_DTL_EMULATOR_Y_IR_INT      (PNX833X_PIC_IRQ_BASE + 45)
+#define PNX8335_PIC_DTL_EMULATOR_C_IR_INT      (PNX833X_PIC_IRQ_BASE + 46)
+#define PNX8335_PIC_DENC_TTX_INT                       (PNX833X_PIC_IRQ_BASE + 47)
+#define PNX8335_PIC_MMI_SIF0_INT                       (PNX833X_PIC_IRQ_BASE + 48)
+#define PNX8335_PIC_MMI_SIF1_INT                       (PNX833X_PIC_IRQ_BASE + 49)
+#define PNX8335_PIC_MMI_CDMMU_INT                      (PNX833X_PIC_IRQ_BASE + 50)
+#define PNX8335_PIC_PIBCS_INT                          (PNX833X_PIC_IRQ_BASE + 51)
+#define PNX8335_PIC_ETHERNET_INT                       (PNX833X_PIC_IRQ_BASE + 52)
+#define PNX8335_PIC_VMSP1_0_INT                                (PNX833X_PIC_IRQ_BASE + 53)
+#define PNX8335_PIC_VMSP1_1_INT                                (PNX833X_PIC_IRQ_BASE + 54)
+#define PNX8335_PIC_VMSP1_DMA_INT                      (PNX833X_PIC_IRQ_BASE + 55)
+#define PNX8335_PIC_TDGR_DE_INT                                (PNX833X_PIC_IRQ_BASE + 56)
+#define PNX8335_PIC_IR1_IRQ_INT                                (PNX833X_PIC_IRQ_BASE + 57)
+#endif
+
+/* GPIO interrupts */
+#define PNX833X_GPIO_0_INT                     (PNX833X_GPIO_IRQ_BASE +  0)
+#define PNX833X_GPIO_1_INT                     (PNX833X_GPIO_IRQ_BASE +  1)
+#define PNX833X_GPIO_2_INT                     (PNX833X_GPIO_IRQ_BASE +  2)
+#define PNX833X_GPIO_3_INT                     (PNX833X_GPIO_IRQ_BASE +  3)
+#define PNX833X_GPIO_4_INT                     (PNX833X_GPIO_IRQ_BASE +  4)
+#define PNX833X_GPIO_5_INT                     (PNX833X_GPIO_IRQ_BASE +  5)
+#define PNX833X_GPIO_6_INT                     (PNX833X_GPIO_IRQ_BASE +  6)
+#define PNX833X_GPIO_7_INT                     (PNX833X_GPIO_IRQ_BASE +  7)
+#define PNX833X_GPIO_8_INT                     (PNX833X_GPIO_IRQ_BASE +  8)
+#define PNX833X_GPIO_9_INT                     (PNX833X_GPIO_IRQ_BASE +  9)
+#define PNX833X_GPIO_10_INT                    (PNX833X_GPIO_IRQ_BASE + 10)
+#define PNX833X_GPIO_11_INT                    (PNX833X_GPIO_IRQ_BASE + 11)
+#define PNX833X_GPIO_12_INT                    (PNX833X_GPIO_IRQ_BASE + 12)
+#define PNX833X_GPIO_13_INT                    (PNX833X_GPIO_IRQ_BASE + 13)
+#define PNX833X_GPIO_14_INT                    (PNX833X_GPIO_IRQ_BASE + 14)
+#define PNX833X_GPIO_15_INT                    (PNX833X_GPIO_IRQ_BASE + 15)
+
+#endif
+
diff --git a/arch/mips/include/asm/mach-pnx833x/irq.h b/arch/mips/include/asm/mach-pnx833x/irq.h
new file mode 100644 (file)
index 0000000..745114b
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ *  irq.h: IRQ mappings for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_MIPS_MACH_PNX833X_IRQ_H
+#define __ASM_MIPS_MACH_PNX833X_IRQ_H
+/*
+ * The "IRQ numbers" are completely virtual.
+ *
+ * In PNX8330/1, we have 48 interrupt lines, numbered from 1 to 48.
+ * Let's use numbers 1..48 for PIC interrupts, number 0 for timer interrupt,
+ * numbers 49..64 for (virtual) GPIO interrupts.
+ *
+ * In PNX8335, we have 57 interrupt lines, numbered from 1 to 57,
+ * connected to PIC, which uses core hardware interrupt 2, and also
+ * a timer interrupt through hardware interrupt 5.
+ * Let's use numbers 1..64 for PIC interrupts, number 0 for timer interrupt,
+ * numbers 65..80 for (virtual) GPIO interrupts.
+ *
+ */
+#if defined(CONFIG_SOC_PNX8335)
+       #define PNX833X_PIC_NUM_IRQ                     58
+#else
+       #define PNX833X_PIC_NUM_IRQ                     37
+#endif
+
+#define MIPS_CPU_NUM_IRQ                               8
+#define PNX833X_GPIO_NUM_IRQ                   16
+
+#define MIPS_CPU_IRQ_BASE                              0
+#define PNX833X_PIC_IRQ_BASE                   (MIPS_CPU_IRQ_BASE + MIPS_CPU_NUM_IRQ)
+#define PNX833X_GPIO_IRQ_BASE                  (PNX833X_PIC_IRQ_BASE + PNX833X_PIC_NUM_IRQ)
+#define NR_IRQS                                                        (MIPS_CPU_NUM_IRQ + PNX833X_PIC_NUM_IRQ + PNX833X_GPIO_NUM_IRQ)
+
+#endif
diff --git a/arch/mips/include/asm/mach-pnx833x/pnx833x.h b/arch/mips/include/asm/mach-pnx833x/pnx833x.h
new file mode 100644 (file)
index 0000000..100f528
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ *  pnx833x.h: Register mappings for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __ASM_MIPS_MACH_PNX833X_PNX833X_H
+#define __ASM_MIPS_MACH_PNX833X_PNX833X_H
+
+/* All regs are accessed in KSEG1 */
+#define PNX833X_BASE           (0xa0000000ul + 0x17E00000ul)
+
+#define PNX833X_REG(offs)      (*((volatile unsigned long *)(PNX833X_BASE + offs)))
+
+/* Registers are named exactly as in PNX833X docs, just with PNX833X_ prefix */
+
+/* Read access to multibit fields */
+#define PNX833X_BIT(val, reg, field)   ((val) & PNX833X_##reg##_##field)
+#define PNX833X_REGBIT(reg, field)     PNX833X_BIT(PNX833X_##reg, reg, field)
+
+/* Use PNX833X_FIELD to extract a field from val */
+#define PNX_FIELD(cpu, val, reg, field) \
+               (((val) & PNX##cpu##_##reg##_##field##_MASK) >> \
+                       PNX##cpu##_##reg##_##field##_SHIFT)
+#define PNX833X_FIELD(val, reg, field) PNX_FIELD(833X, val, reg, field)
+#define PNX8330_FIELD(val, reg, field) PNX_FIELD(8330, val, reg, field)
+#define PNX8335_FIELD(val, reg, field) PNX_FIELD(8335, val, reg, field)
+
+/* Use PNX833X_REGFIELD to extract a field from a register */
+#define PNX833X_REGFIELD(reg, field)   PNX833X_FIELD(PNX833X_##reg, reg, field)
+#define PNX8330_REGFIELD(reg, field)   PNX8330_FIELD(PNX8330_##reg, reg, field)
+#define PNX8335_REGFIELD(reg, field)   PNX8335_FIELD(PNX8335_##reg, reg, field)
+
+
+#define PNX_WRITEFIELD(cpu, val, reg, field) \
+       (PNX##cpu##_##reg = (PNX##cpu##_##reg & ~(PNX##cpu##_##reg##_##field##_MASK)) | \
+                                               ((val) << PNX##cpu##_##reg##_##field##_SHIFT))
+#define PNX833X_WRITEFIELD(val, reg, field) \
+                                       PNX_WRITEFIELD(833X, val, reg, field)
+#define PNX8330_WRITEFIELD(val, reg, field) \
+                                       PNX_WRITEFIELD(8330, val, reg, field)
+#define PNX8335_WRITEFIELD(val, reg, field) \
+                                       PNX_WRITEFIELD(8335, val, reg, field)
+
+
+/* Macros to detect CPU type */
+
+#define PNX833X_CONFIG_MODULE_ID               PNX833X_REG(0x7FFC)
+#define PNX833X_CONFIG_MODULE_ID_MAJREV_MASK   0x0000f000
+#define PNX833X_CONFIG_MODULE_ID_MAJREV_SHIFT  12
+#define PNX8330_CONFIG_MODULE_MAJREV           4
+#define PNX8335_CONFIG_MODULE_MAJREV           5
+#define CPU_IS_PNX8330 (PNX833X_REGFIELD(CONFIG_MODULE_ID, MAJREV) == \
+                                       PNX8330_CONFIG_MODULE_MAJREV)
+#define CPU_IS_PNX8335 (PNX833X_REGFIELD(CONFIG_MODULE_ID, MAJREV) == \
+                                       PNX8335_CONFIG_MODULE_MAJREV)
+
+
+
+#define PNX833X_RESET_CONTROL          PNX833X_REG(0x8004)
+#define PNX833X_RESET_CONTROL_2        PNX833X_REG(0x8014)
+
+#define PNX833X_PIC_REG(offs)          PNX833X_REG(0x01000 + (offs))
+#define PNX833X_PIC_INT_PRIORITY       PNX833X_PIC_REG(0x0)
+#define PNX833X_PIC_INT_SRC            PNX833X_PIC_REG(0x4)
+#define PNX833X_PIC_INT_SRC_INT_SRC_MASK       0x00000FF8ul    /* bits 11:3 */
+#define PNX833X_PIC_INT_SRC_INT_SRC_SHIFT      3
+#define PNX833X_PIC_INT_REG(irq)       PNX833X_PIC_REG(0x10 + 4*(irq))
+
+#define PNX833X_CLOCK_CPUCP_CTL        PNX833X_REG(0x9228)
+#define PNX833X_CLOCK_CPUCP_CTL_EXIT_RESET     0x00000002ul    /* bit 1 */
+#define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_MASK 0x00000018ul    /* bits 4:3 */
+#define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_SHIFT        3
+
+#define PNX8335_CLOCK_PLL_CPU_CTL              PNX833X_REG(0x9020)
+#define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_MASK    0x1f
+#define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_SHIFT   0
+
+#define PNX833X_CONFIG_MUX             PNX833X_REG(0x7004)
+#define PNX833X_CONFIG_MUX_IDE_MUX     0x00000080              /* bit 7 */
+
+#define PNX8330_CONFIG_POLYFUSE_7      PNX833X_REG(0x7040)
+#define PNX8330_CONFIG_POLYFUSE_7_BOOT_MODE_MASK       0x00180000
+#define PNX8330_CONFIG_POLYFUSE_7_BOOT_MODE_SHIFT      19
+
+#define PNX833X_PIO_IN         PNX833X_REG(0xF000)
+#define PNX833X_PIO_OUT                PNX833X_REG(0xF004)
+#define PNX833X_PIO_DIR                PNX833X_REG(0xF008)
+#define PNX833X_PIO_SEL                PNX833X_REG(0xF014)
+#define PNX833X_PIO_INT_EDGE   PNX833X_REG(0xF020)
+#define PNX833X_PIO_INT_HI     PNX833X_REG(0xF024)
+#define PNX833X_PIO_INT_LO     PNX833X_REG(0xF028)
+#define PNX833X_PIO_INT_STATUS PNX833X_REG(0xFFE0)
+#define PNX833X_PIO_INT_ENABLE PNX833X_REG(0xFFE4)
+#define PNX833X_PIO_INT_CLEAR  PNX833X_REG(0xFFE8)
+#define PNX833X_PIO_IN2                PNX833X_REG(0xF05C)
+#define PNX833X_PIO_OUT2       PNX833X_REG(0xF060)
+#define PNX833X_PIO_DIR2       PNX833X_REG(0xF064)
+#define PNX833X_PIO_SEL2       PNX833X_REG(0xF068)
+
+#define PNX833X_UART0_PORTS_START      (PNX833X_BASE + 0xB000)
+#define PNX833X_UART0_PORTS_END                (PNX833X_BASE + 0xBFFF)
+#define PNX833X_UART1_PORTS_START      (PNX833X_BASE + 0xC000)
+#define PNX833X_UART1_PORTS_END                (PNX833X_BASE + 0xCFFF)
+
+#define PNX833X_USB_PORTS_START                (PNX833X_BASE + 0x19000)
+#define PNX833X_USB_PORTS_END          (PNX833X_BASE + 0x19FFF)
+
+#define PNX833X_CONFIG_USB             PNX833X_REG(0x7008)
+
+#define PNX833X_I2C0_PORTS_START       (PNX833X_BASE + 0xD000)
+#define PNX833X_I2C0_PORTS_END         (PNX833X_BASE + 0xDFFF)
+#define PNX833X_I2C1_PORTS_START       (PNX833X_BASE + 0xE000)
+#define PNX833X_I2C1_PORTS_END         (PNX833X_BASE + 0xEFFF)
+
+#define PNX833X_IDE_PORTS_START                (PNX833X_BASE + 0x1A000)
+#define PNX833X_IDE_PORTS_END          (PNX833X_BASE + 0x1AFFF)
+#define PNX833X_IDE_MODULE_ID          PNX833X_REG(0x1AFFC)
+
+#define PNX833X_IDE_MODULE_ID_MODULE_ID_MASK   0xFFFF0000
+#define PNX833X_IDE_MODULE_ID_MODULE_ID_SHIFT  16
+#define PNX833X_IDE_MODULE_ID_VALUE            0xA009
+
+
+#define PNX833X_MIU_SEL0                       PNX833X_REG(0x2004)
+#define PNX833X_MIU_SEL0_TIMING                PNX833X_REG(0x2008)
+#define PNX833X_MIU_SEL1                       PNX833X_REG(0x200C)
+#define PNX833X_MIU_SEL1_TIMING                PNX833X_REG(0x2010)
+#define PNX833X_MIU_SEL2                       PNX833X_REG(0x2014)
+#define PNX833X_MIU_SEL2_TIMING                PNX833X_REG(0x2018)
+#define PNX833X_MIU_SEL3                       PNX833X_REG(0x201C)
+#define PNX833X_MIU_SEL3_TIMING                PNX833X_REG(0x2020)
+
+#define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_MASK  (1 << 14)
+#define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_SHIFT 14
+
+#define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_MASK        (1 << 7)
+#define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_SHIFT       7
+
+#define PNX833X_MIU_SEL0_BURST_PAGE_LEN_MASK   (0xF << 9)
+#define PNX833X_MIU_SEL0_BURST_PAGE_LEN_SHIFT  9
+
+#define PNX833X_MIU_CONFIG_SPI         PNX833X_REG(0x2000)
+
+#define PNX833X_MIU_CONFIG_SPI_OPCODE_MASK     (0xFF << 3)
+#define PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT    3
+
+#define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_MASK        (1 << 2)
+#define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT       2
+
+#define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_MASK        (1 << 1)
+#define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT       1
+
+#define PNX833X_MIU_CONFIG_SPI_SYNC_MASK       (1 << 0)
+#define PNX833X_MIU_CONFIG_SPI_SYNC_SHIFT      0
+
+#define PNX833X_WRITE_CONFIG_SPI(opcode, data_enable, addr_enable, sync) \
+   (PNX833X_MIU_CONFIG_SPI =                                           \
+    ((opcode) << PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT) |                        \
+    ((data_enable) << PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT) |      \
+    ((addr_enable) << PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT) |      \
+    ((sync) << PNX833X_MIU_CONFIG_SPI_SYNC_SHIFT))
+
+#define PNX8335_IP3902_PORTS_START             (PNX833X_BASE + 0x2F000)
+#define PNX8335_IP3902_PORTS_END               (PNX833X_BASE + 0x2FFFF)
+#define PNX8335_IP3902_MODULE_ID               PNX833X_REG(0x2FFFC)
+
+#define PNX8335_IP3902_MODULE_ID_MODULE_ID_MASK                0xFFFF0000
+#define PNX8335_IP3902_MODULE_ID_MODULE_ID_SHIFT       16
+#define PNX8335_IP3902_MODULE_ID_VALUE                 0x3902
+
+ /* I/O location(gets remapped)*/
+#define PNX8335_NAND_BASE          0x18000000
+/* I/O location with CLE high */
+#define PNX8335_NAND_CLE_MASK  0x00100000
+/* I/O location with ALE high */
+#define PNX8335_NAND_ALE_MASK  0x00010000
+
+#define PNX8335_SATA_PORTS_START       (PNX833X_BASE + 0x2E000)
+#define PNX8335_SATA_PORTS_END         (PNX833X_BASE + 0x2EFFF)
+#define PNX8335_SATA_MODULE_ID         PNX833X_REG(0x2EFFC)
+
+#define PNX8335_SATA_MODULE_ID_MODULE_ID_MASK  0xFFFF0000
+#define PNX8335_SATA_MODULE_ID_MODULE_ID_SHIFT 16
+#define PNX8335_SATA_MODULE_ID_VALUE           0xA099
+
+#endif
diff --git a/arch/mips/include/asm/mach-pnx833x/war.h b/arch/mips/include/asm/mach-pnx833x/war.h
new file mode 100644 (file)
index 0000000..82cd1e9
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
+ */
+#ifndef __ASM_MIPS_MACH_PNX833X_WAR_H
+#define __ASM_MIPS_MACH_PNX833X_WAR_H
+
+#define R4600_V1_INDEX_ICACHEOP_WAR    0
+#define R4600_V1_HIT_CACHEOP_WAR       0
+#define R4600_V2_HIT_CACHEOP_WAR       0
+#define R5432_CP0_INTERRUPT_WAR                0
+#define BCM1250_M3_WAR                 0
+#define SIBYTE_1956_WAR                        0
+#define MIPS4K_ICACHE_REFILL_WAR       0
+#define MIPS_CACHE_SYNC_WAR            0
+#define TX49XX_ICACHE_INDEX_INV_WAR    0
+#define RM9000_CDEX_SMP_WAR            0
+#define ICACHE_REFILLS_WORKAROUND_WAR  0
+#define R10000_LLSC_WAR                        0
+#define MIPS34K_MISSED_ITLB_WAR                0
+
+#endif /* __ASM_MIPS_MACH_PNX8550_WAR_H */
diff --git a/arch/mips/include/asm/mach-tx49xx/mangle-port.h b/arch/mips/include/asm/mach-tx49xx/mangle-port.h
new file mode 100644 (file)
index 0000000..5e6912f
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ASM_MACH_TX49XX_MANGLE_PORT_H
+#define __ASM_MACH_TX49XX_MANGLE_PORT_H
+
+#define __swizzle_addr_b(port) (port)
+#define __swizzle_addr_w(port) (port)
+#define __swizzle_addr_l(port) (port)
+#define __swizzle_addr_q(port) (port)
+
+#define ioswabb(a, x)          (x)
+#define __mem_ioswabb(a, x)    (x)
+#if defined(CONFIG_TOSHIBA_RBTX4939) && \
+       (defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)) && \
+       defined(__BIG_ENDIAN)
+#define NEEDS_TXX9_IOSWABW
+extern u16 (*ioswabw)(volatile u16 *a, u16 x);
+extern u16 (*__mem_ioswabw)(volatile u16 *a, u16 x);
+#else
+#define ioswabw(a, x)          le16_to_cpu(x)
+#define __mem_ioswabw(a, x)    (x)
+#endif
+#define ioswabl(a, x)          le32_to_cpu(x)
+#define __mem_ioswabl(a, x)    (x)
+#define ioswabq(a, x)          le64_to_cpu(x)
+#define __mem_ioswabq(a, x)    (x)
+
+#endif /* __ASM_MACH_TX49XX_MANGLE_PORT_H */
index 979866000da43d6fe7f0c72a1862db93a3ff0c19..9316324d070d7529b8bc4961832b9b1b5531c82e 100644 (file)
 #define PM_16M         0x01ffe000
 #define PM_64M         0x07ffe000
 #define PM_256M                0x1fffe000
+#define PM_1G          0x7fffe000
 
 #endif
 
index de6d09ebbd800a94a8503e45f84b9bfe5f7ceeec..e2e09b2cd26579ea0220a69913188dc386b708b8 100644 (file)
@@ -98,6 +98,8 @@ search_module_dbetables(unsigned long addr)
 #define MODULE_PROC_FAMILY "R5000 "
 #elif defined CONFIG_CPU_R5432
 #define MODULE_PROC_FAMILY "R5432 "
+#elif defined CONFIG_CPU_R5500
+#define MODULE_PROC_FAMILY "R5500 "
 #elif defined CONFIG_CPU_R6000
 #define MODULE_PROC_FAMILY "R6000 "
 #elif defined CONFIG_CPU_NEVADA
index 9c22571b160d7416228226144420df1c9a5e6e7b..813abd16255d13322d27130f52df281ae48b8b78 100644 (file)
@@ -80,25 +80,25 @@ enum pt_watch_style {
        pt_watch_style_mips64
 };
 struct mips32_watch_regs {
-       uint32_t watchlo[8];
+       unsigned int watchlo[8];
        /* Lower 16 bits of watchhi. */
-       uint16_t watchhi[8];
+       unsigned short watchhi[8];
        /* Valid mask and I R W bits.
         * bit 0 -- 1 if W bit is usable.
         * bit 1 -- 1 if R bit is usable.
         * bit 2 -- 1 if I bit is usable.
         * bits 3 - 11 -- Valid watchhi mask bits.
         */
-       uint16_t watch_masks[8];
+       unsigned short watch_masks[8];
        /* The number of valid watch register pairs.  */
-       uint32_t num_valid;
+       unsigned int num_valid;
 } __attribute__((aligned(8)));
 
 struct mips64_watch_regs {
-       uint64_t watchlo[8];
-       uint16_t watchhi[8];
-       uint16_t watch_masks[8];
-       uint32_t num_valid;
+       unsigned long long watchlo[8];
+       unsigned short watchhi[8];
+       unsigned short watch_masks[8];
+       unsigned int num_valid;
 } __attribute__((aligned(8)));
 
 struct pt_watch_regs {
@@ -116,6 +116,7 @@ struct pt_watch_regs {
 
 #include <linux/compiler.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 #include <asm/isadep.h>
 
 struct task_struct;
index 4316a3e57678e995219c8a8a4f4278adfe80baa2..9cde0090cbf6e9db86210e2d19632236e35787c1 100644 (file)
@@ -86,4 +86,9 @@ void txx9_iocled_init(unsigned long baseaddr,
                      int basenum, unsigned int num, int lowactive,
                      const char *color, char **deftriggers);
 
+/* 7SEG LED */
+void txx9_7segled_init(unsigned int num,
+                      void (*putc)(unsigned int pos, unsigned char val));
+int txx9_7segled_putc(unsigned int pos, char c);
+
 #endif /* __ASM_TXX9_GENERIC_H */
index d9da7112aaf8188b90eb88bde35f556cdd933887..b1372c27f1369d6fa50590dfe0f37a6cbd01b112 100644 (file)
@@ -33,6 +33,7 @@ obj-$(CONFIG_CPU_R4X00)               += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R5000)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R6000)                += r6000_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R5432)                += r4k_fpu.o r4k_switch.o
+obj-$(CONFIG_CPU_R5500)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R8000)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_RM7000)       += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_RM9000)       += r4k_fpu.o r4k_switch.o
index 5e75a316f6b1b3fdb3b7db49feaf36f7752981cc..759f68066b5d529991dea584758d46c26ef1887b 100644 (file)
@@ -180,7 +180,7 @@ bad_stack:
         * The system call does not exist in this kernel
         */
 illegal_syscall:
-       li      v0, -ENOSYS                     # error
+       li      v0, ENOSYS                      # error
        sw      v0, PT_R2(sp)
        li      t0, 1                           # set error flag
        sw      t0, PT_R7(sp)
@@ -293,7 +293,7 @@ bad_alignment:
        jr      t2
        /* Unreached */
 
-einval:        li      v0, -EINVAL
+einval:        li      v0, -ENOSYS
        jr      ra
        END(sys_syscall)
 
index 3d58204c9d44f9f2f380373fa474ba194cdaf424..a9e1716189948c2b76eaa47aa985208277d00667 100644 (file)
@@ -117,7 +117,7 @@ syscall_trace_entry:
 
 illegal_syscall:
        /* This also isn't a 64-bit syscall, throw an error.  */
-       li      v0, -ENOSYS                     # error
+       li      v0, ENOSYS                      # error
        sd      v0, PT_R2(sp)
        li      t0, 1                           # set error flag
        sd      t0, PT_R7(sp)
index 16f8edfe5cdce81a63d850980cb0dda08e94049f..4430a1f8fdf127da309875755735a949f188c98a 100644 (file)
@@ -601,8 +601,8 @@ static int __init debugfs_mips(void)
        struct dentry *d;
 
        d = debugfs_create_dir("mips", NULL);
-       if (IS_ERR(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -ENOMEM;
        mips_debugfs_dir = d;
        return 0;
 }
index 7b59cfb7e6022a21cf90cbd93e8e6a2dfe3a53d3..b79ea7055ec30210a392e348bb19d6a23ddfd174 100644 (file)
@@ -163,8 +163,10 @@ static void stop_this_cpu(void *dummy)
         * Remove this CPU:
         */
        cpu_clear(smp_processor_id(), cpu_online_map);
-       local_irq_enable();     /* May need to service _machine_restart IPI */
-       for (;;);               /* Wait if available. */
+       for (;;) {
+               if (cpu_wait)
+                       (*cpu_wait)();          /* Wait if available. */
+       }
 }
 
 void smp_send_stop(void)
index c327b21bca810e2b488f4bdb983ad014c1b26de1..20709669e5923c0e974a20c3b797b25f24702694 100644 (file)
@@ -560,12 +560,12 @@ static int __init debugfs_unaligned(void)
                return -ENODEV;
        d = debugfs_create_u32("unaligned_instructions", S_IRUGO,
                               mips_debugfs_dir, &unaligned_instructions);
-       if (IS_ERR(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -ENOMEM;
        d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR,
                               mips_debugfs_dir, &unaligned_action);
-       if (IS_ERR(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -ENOMEM;
        return 0;
 }
 __initcall(debugfs_unaligned);
index c1e41f15cc7eef46a521e2ce691b0fc0c8245e45..8be03a8e1ad49e50846c133763667d1bc96d58b3 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <asm/mips-boards/bonito64.h>
+#include <asm/mach-lemote/pci.h>
 
 extern struct pci_ops bonito64_pci_ops;
 
 static struct resource loongson2e_pci_mem_resource = {
        .name   = "LOONGSON2E PCI MEM",
-       .start  = 0x14000000UL,
-       .end    = 0x1fffffffUL,
+       .start  = LOONGSON2E_PCI_MEM_START,
+       .end    = LOONGSON2E_PCI_MEM_END,
        .flags  = IORESOURCE_MEM,
 };
 
 static struct resource loongson2e_pci_io_resource = {
        .name   = "LOONGSON2E PCI IO MEM",
-       .start  = 0x00004000UL,
+       .start  = LOONGSON2E_PCI_IO_START,
        .end    = IO_SPACE_LIMIT,
        .flags  = IORESOURCE_IO,
 };
@@ -82,6 +83,12 @@ static void __init ict_pcimap(void)
 static int __init pcibios_init(void)
 {
        ict_pcimap();
+
+       loongson2e_pci_controller.io_map_base =
+           (unsigned long) ioremap(LOONGSON2E_IO_PORT_BASE,
+                                   loongson2e_pci_io_resource.end -
+                                   loongson2e_pci_io_resource.start + 1);
+
        register_pci_controller(&loongson2e_pci_controller);
 
        return 0;
index 2cc6745991abbb6269e731bb46e9b4e358dd1160..ebd6ceaef2fde817d987d799dc52f055979f3203 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/mc146818-time.h>
 #include <asm/time.h>
 #include <asm/wbflush.h>
+#include <asm/mach-lemote/pci.h>
 
 #ifdef CONFIG_VT
 #include <linux/console.h>
 
 extern void mips_reboot_setup(void);
 
-#ifdef CONFIG_64BIT
-#define PTR_PAD(p) ((0xffffffff00000000)|((unsigned long long)(p)))
-#else
-#define PTR_PAD(p) (p)
-#endif
-
 unsigned long cpu_clock_freq;
 unsigned long bus_clock;
 unsigned int memsize;
@@ -80,8 +75,8 @@ static void wbflush_loongson2e(void)
 
 void __init plat_mem_setup(void)
 {
-       set_io_port_base(PTR_PAD(0xbfd00000));
-
+       set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE,
+                               IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1));
        mips_reboot_setup();
 
        __wbflush = wbflush_loongson2e;
index 8810dfb915dd210e0f45d076be1e36e6af779404..dbcf6511b74e885a579bcab15563911e23b0078f 100644 (file)
@@ -18,6 +18,7 @@ obj-$(CONFIG_CPU_R4300)               += dump_tlb.o
 obj-$(CONFIG_CPU_R4X00)                += dump_tlb.o
 obj-$(CONFIG_CPU_R5000)                += dump_tlb.o
 obj-$(CONFIG_CPU_R5432)                += dump_tlb.o
+obj-$(CONFIG_CPU_R5500)                += dump_tlb.o
 obj-$(CONFIG_CPU_R6000)                +=
 obj-$(CONFIG_CPU_R8000)                +=
 obj-$(CONFIG_CPU_RM7000)       += dump_tlb.o
index 465ff0ec85b9316d151cca44786a92f0b41c85d7..779821cd54ab7a4d93346045262e0d23139d7196 100644 (file)
@@ -25,6 +25,7 @@ static inline const char *msk2str(unsigned int mask)
        case PM_16M:    return "16Mb";
        case PM_64M:    return "64Mb";
        case PM_256M:   return "256Mb";
+       case PM_1G:     return "1Gb";
 #endif
        }
        return "";
index b08fc65c13a63c5c24e50acfca5328ae3d90337c..7ec0b217dfd3087fd317810e2bc14cea75ec6f6f 100644 (file)
@@ -1299,12 +1299,12 @@ static int __init debugfs_fpuemu(void)
        if (!mips_debugfs_dir)
                return -ENODEV;
        dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
-       if (IS_ERR(dir))
-               return PTR_ERR(dir);
+       if (!dir)
+               return -ENOMEM;
        for (i = 0; i < ARRAY_SIZE(vars); i++) {
                d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
-               if (IS_ERR(d))
-                       return PTR_ERR(d);
+               if (!d)
+                       return -ENOMEM;
        }
        return 0;
 }
index 44e8dd8106bf47c774e239e8f550ed4ac6216801..95ba32b5b720e22f3b615a7f2de3f8ca228d8468 100644 (file)
@@ -19,6 +19,7 @@ obj-$(CONFIG_CPU_R4300)               += c-r4k.o cex-gen.o tlb-r4k.o
 obj-$(CONFIG_CPU_R4X00)                += c-r4k.o cex-gen.o tlb-r4k.o
 obj-$(CONFIG_CPU_R5000)                += c-r4k.o cex-gen.o tlb-r4k.o
 obj-$(CONFIG_CPU_R5432)                += c-r4k.o cex-gen.o tlb-r4k.o
+obj-$(CONFIG_CPU_R5500)                += c-r4k.o cex-gen.o tlb-r4k.o
 obj-$(CONFIG_CPU_R8000)                += c-r4k.o cex-gen.o tlb-r8k.o
 obj-$(CONFIG_CPU_RM7000)       += c-r4k.o cex-gen.o tlb-r4k.o
 obj-$(CONFIG_CPU_RM9000)       += c-r4k.o cex-gen.o tlb-r4k.o
index 891312f8e5a6b19d01b6485cda535821520e346c..5b98d0e731c2238ae0f8ff64d3a3d139aa4ef562 100644 (file)
@@ -324,7 +324,6 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
                if (cpu_is_noncoherent_r10000(dev))
                        __dma_sync((unsigned long)page_address(sg_page(sg)),
                                   sg->length, direction);
-               plat_unmap_dma_mem(sg->dma_address);
        }
 }
 
@@ -342,7 +341,6 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nele
                if (!plat_device_is_coherent(dev))
                        __dma_sync((unsigned long)page_address(sg_page(sg)),
                                   sg->length, direction);
-               plat_unmap_dma_mem(sg->dma_address);
        }
 }
 
diff --git a/arch/mips/nxp/pnx833x/common/Makefile b/arch/mips/nxp/pnx833x/common/Makefile
new file mode 100644 (file)
index 0000000..4a16f3b
--- /dev/null
@@ -0,0 +1,3 @@
+obj-y := interrupts.o platform.o prom.o setup.o reset.o
+
+EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/nxp/pnx833x/common/interrupts.c b/arch/mips/nxp/pnx833x/common/interrupts.c
new file mode 100644 (file)
index 0000000..30533ba
--- /dev/null
@@ -0,0 +1,380 @@
+/*
+ *  interrupts.c: Interrupt mappings for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/kernel.h>
+#include <linux/irq.h>
+#include <linux/hardirq.h>
+#include <linux/interrupt.h>
+#include <asm/mipsregs.h>
+#include <asm/irq_cpu.h>
+#include <irq.h>
+#include <irq-mapping.h>
+#include <gpio.h>
+
+static int mips_cpu_timer_irq;
+
+static const unsigned int irq_prio[PNX833X_PIC_NUM_IRQ] =
+{
+    0, /* unused */
+    4, /* PNX833X_PIC_I2C0_INT                 1 */
+    4, /* PNX833X_PIC_I2C1_INT                 2 */
+    1, /* PNX833X_PIC_UART0_INT                3 */
+    1, /* PNX833X_PIC_UART1_INT                4 */
+    6, /* PNX833X_PIC_TS_IN0_DV_INT            5 */
+    6, /* PNX833X_PIC_TS_IN0_DMA_INT           6 */
+    7, /* PNX833X_PIC_GPIO_INT                 7 */
+    4, /* PNX833X_PIC_AUDIO_DEC_INT            8 */
+    5, /* PNX833X_PIC_VIDEO_DEC_INT            9 */
+    4, /* PNX833X_PIC_CONFIG_INT              10 */
+    4, /* PNX833X_PIC_AOI_INT                 11 */
+    9, /* PNX833X_PIC_SYNC_INT                12 */
+    9, /* PNX8335_PIC_SATA_INT                13 */
+    4, /* PNX833X_PIC_OSD_INT                 14 */
+    9, /* PNX833X_PIC_DISP1_INT               15 */
+    4, /* PNX833X_PIC_DEINTERLACER_INT        16 */
+    9, /* PNX833X_PIC_DISPLAY2_INT            17 */
+    4, /* PNX833X_PIC_VC_INT                  18 */
+    4, /* PNX833X_PIC_SC_INT                  19 */
+    9, /* PNX833X_PIC_IDE_INT                 20 */
+    9, /* PNX833X_PIC_IDE_DMA_INT             21 */
+    6, /* PNX833X_PIC_TS_IN1_DV_INT           22 */
+    6, /* PNX833X_PIC_TS_IN1_DMA_INT          23 */
+    4, /* PNX833X_PIC_SGDX_DMA_INT            24 */
+    4, /* PNX833X_PIC_TS_OUT_INT              25 */
+    4, /* PNX833X_PIC_IR_INT                  26 */
+    3, /* PNX833X_PIC_VMSP1_INT               27 */
+    3, /* PNX833X_PIC_VMSP2_INT               28 */
+    4, /* PNX833X_PIC_PIBC_INT                29 */
+    4, /* PNX833X_PIC_TS_IN0_TRD_INT          30 */
+    4, /* PNX833X_PIC_SGDX_TPD_INT            31 */
+    5, /* PNX833X_PIC_USB_INT                 32 */
+    4, /* PNX833X_PIC_TS_IN1_TRD_INT          33 */
+    4, /* PNX833X_PIC_CLOCK_INT               34 */
+    4, /* PNX833X_PIC_SGDX_PARSER_INT         35 */
+    4, /* PNX833X_PIC_VMSP_DMA_INT            36 */
+#if defined(CONFIG_SOC_PNX8335)
+    4, /* PNX8335_PIC_MIU_INT                 37 */
+    4, /* PNX8335_PIC_AVCHIP_IRQ_INT          38 */
+    9, /* PNX8335_PIC_SYNC_HD_INT             39 */
+    9, /* PNX8335_PIC_DISP_HD_INT             40 */
+    9, /* PNX8335_PIC_DISP_SCALER_INT         41 */
+    4, /* PNX8335_PIC_OSD_HD1_INT             42 */
+    4, /* PNX8335_PIC_DTL_WRITER_Y_INT        43 */
+    4, /* PNX8335_PIC_DTL_WRITER_C_INT        44 */
+    4, /* PNX8335_PIC_DTL_EMULATOR_Y_IR_INT   45 */
+    4, /* PNX8335_PIC_DTL_EMULATOR_C_IR_INT   46 */
+    4, /* PNX8335_PIC_DENC_TTX_INT            47 */
+    4, /* PNX8335_PIC_MMI_SIF0_INT            48 */
+    4, /* PNX8335_PIC_MMI_SIF1_INT            49 */
+    4, /* PNX8335_PIC_MMI_CDMMU_INT           50 */
+    4, /* PNX8335_PIC_PIBCS_INT               51 */
+   12, /* PNX8335_PIC_ETHERNET_INT            52 */
+    3, /* PNX8335_PIC_VMSP1_0_INT             53 */
+    3, /* PNX8335_PIC_VMSP1_1_INT             54 */
+    4, /* PNX8335_PIC_VMSP1_DMA_INT           55 */
+    4, /* PNX8335_PIC_TDGR_DE_INT             56 */
+    4, /* PNX8335_PIC_IR1_IRQ_INT             57 */
+#endif
+};
+
+static void pnx833x_timer_dispatch(void)
+{
+       do_IRQ(mips_cpu_timer_irq);
+}
+
+static void pic_dispatch(void)
+{
+       unsigned int irq = PNX833X_REGFIELD(PIC_INT_SRC, INT_SRC);
+
+       if ((irq >= 1) && (irq < (PNX833X_PIC_NUM_IRQ))) {
+               unsigned long priority = PNX833X_PIC_INT_PRIORITY;
+               PNX833X_PIC_INT_PRIORITY = irq_prio[irq];
+
+               if (irq == PNX833X_PIC_GPIO_INT) {
+                       unsigned long mask = PNX833X_PIO_INT_STATUS & PNX833X_PIO_INT_ENABLE;
+                       int pin;
+                       while ((pin = ffs(mask & 0xffff))) {
+                               pin -= 1;
+                               do_IRQ(PNX833X_GPIO_IRQ_BASE + pin);
+                               mask &= ~(1 << pin);
+                       }
+               } else {
+                       do_IRQ(irq + PNX833X_PIC_IRQ_BASE);
+               }
+
+               PNX833X_PIC_INT_PRIORITY = priority;
+       } else {
+               printk(KERN_ERR "plat_irq_dispatch: unexpected irq %u\n", irq);
+       }
+}
+
+asmlinkage void plat_irq_dispatch(void)
+{
+       unsigned int pending = read_c0_status() & read_c0_cause();
+
+       if (pending & STATUSF_IP4)
+               pic_dispatch();
+       else if (pending & STATUSF_IP7)
+               do_IRQ(PNX833X_TIMER_IRQ);
+       else
+               spurious_interrupt();
+}
+
+static inline void pnx833x_hard_enable_pic_irq(unsigned int irq)
+{
+       /* Currently we do this by setting IRQ priority to 1.
+          If priority support is being implemented, 1 should be repalced
+               by a better value. */
+       PNX833X_PIC_INT_REG(irq) = irq_prio[irq];
+}
+
+static inline void pnx833x_hard_disable_pic_irq(unsigned int irq)
+{
+       /* Disable IRQ by writing setting it's priority to 0 */
+       PNX833X_PIC_INT_REG(irq) = 0;
+}
+
+static int irqflags[PNX833X_PIC_NUM_IRQ];      /* initialized by zeroes */
+#define IRQFLAG_STARTED                1
+#define IRQFLAG_DISABLED       2
+
+static DEFINE_SPINLOCK(pnx833x_irq_lock);
+
+static unsigned int pnx833x_startup_pic_irq(unsigned int irq)
+{
+       unsigned long flags;
+       unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;
+
+       spin_lock_irqsave(&pnx833x_irq_lock, flags);
+
+       irqflags[pic_irq] = IRQFLAG_STARTED;    /* started, not disabled */
+       pnx833x_hard_enable_pic_irq(pic_irq);
+
+       spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
+       return 0;
+}
+
+static void pnx833x_shutdown_pic_irq(unsigned int irq)
+{
+       unsigned long flags;
+       unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;
+
+       spin_lock_irqsave(&pnx833x_irq_lock, flags);
+
+       irqflags[pic_irq] = 0;                  /* not started */
+       pnx833x_hard_disable_pic_irq(pic_irq);
+
+       spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
+}
+
+static void pnx833x_enable_pic_irq(unsigned int irq)
+{
+       unsigned long flags;
+       unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;
+
+       spin_lock_irqsave(&pnx833x_irq_lock, flags);
+
+       irqflags[pic_irq] &= ~IRQFLAG_DISABLED;
+       if (irqflags[pic_irq] == IRQFLAG_STARTED)
+               pnx833x_hard_enable_pic_irq(pic_irq);
+
+       spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
+}
+
+static void pnx833x_disable_pic_irq(unsigned int irq)
+{
+       unsigned long flags;
+       unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;
+
+       spin_lock_irqsave(&pnx833x_irq_lock, flags);
+
+       irqflags[pic_irq] |= IRQFLAG_DISABLED;
+       pnx833x_hard_disable_pic_irq(pic_irq);
+
+       spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
+}
+
+static void pnx833x_ack_pic_irq(unsigned int irq)
+{
+}
+
+static void pnx833x_end_pic_irq(unsigned int irq)
+{
+}
+
+static DEFINE_SPINLOCK(pnx833x_gpio_pnx833x_irq_lock);
+
+static unsigned int pnx833x_startup_gpio_irq(unsigned int irq)
+{
+       int pin = irq - PNX833X_GPIO_IRQ_BASE;
+       unsigned long flags;
+       spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
+       pnx833x_gpio_enable_irq(pin);
+       spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
+       return 0;
+}
+
+static void pnx833x_enable_gpio_irq(unsigned int irq)
+{
+       int pin = irq - PNX833X_GPIO_IRQ_BASE;
+       unsigned long flags;
+       spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
+       pnx833x_gpio_enable_irq(pin);
+       spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
+}
+
+static void pnx833x_disable_gpio_irq(unsigned int irq)
+{
+       int pin = irq - PNX833X_GPIO_IRQ_BASE;
+       unsigned long flags;
+       spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
+       pnx833x_gpio_disable_irq(pin);
+       spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
+}
+
+static void pnx833x_ack_gpio_irq(unsigned int irq)
+{
+}
+
+static void pnx833x_end_gpio_irq(unsigned int irq)
+{
+       int pin = irq - PNX833X_GPIO_IRQ_BASE;
+       unsigned long flags;
+       spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
+       pnx833x_gpio_clear_irq(pin);
+       spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
+}
+
+static int pnx833x_set_type_gpio_irq(unsigned int irq, unsigned int flow_type)
+{
+       int pin = irq - PNX833X_GPIO_IRQ_BASE;
+       int gpio_mode;
+
+       switch (flow_type) {
+       case IRQ_TYPE_EDGE_RISING:
+               gpio_mode = GPIO_INT_EDGE_RISING;
+               break;
+       case IRQ_TYPE_EDGE_FALLING:
+               gpio_mode = GPIO_INT_EDGE_FALLING;
+               break;
+       case IRQ_TYPE_EDGE_BOTH:
+               gpio_mode = GPIO_INT_EDGE_BOTH;
+               break;
+       case IRQ_TYPE_LEVEL_HIGH:
+               gpio_mode = GPIO_INT_LEVEL_HIGH;
+               break;
+       case IRQ_TYPE_LEVEL_LOW:
+               gpio_mode = GPIO_INT_LEVEL_LOW;
+               break;
+       default:
+               gpio_mode = GPIO_INT_NONE;
+               break;
+       }
+
+       pnx833x_gpio_setup_irq(gpio_mode, pin);
+
+       return 0;
+}
+
+static struct irq_chip pnx833x_pic_irq_type = {
+       .typename = "PNX-PIC",
+       .startup = pnx833x_startup_pic_irq,
+       .shutdown = pnx833x_shutdown_pic_irq,
+       .enable = pnx833x_enable_pic_irq,
+       .disable = pnx833x_disable_pic_irq,
+       .ack = pnx833x_ack_pic_irq,
+       .end = pnx833x_end_pic_irq
+};
+
+static struct irq_chip pnx833x_gpio_irq_type = {
+       .typename = "PNX-GPIO",
+       .startup = pnx833x_startup_gpio_irq,
+       .shutdown = pnx833x_disable_gpio_irq,
+       .enable = pnx833x_enable_gpio_irq,
+       .disable = pnx833x_disable_gpio_irq,
+       .ack = pnx833x_ack_gpio_irq,
+       .end = pnx833x_end_gpio_irq,
+       .set_type = pnx833x_set_type_gpio_irq
+};
+
+void __init arch_init_irq(void)
+{
+       unsigned int irq;
+
+       /* setup standard internal cpu irqs */
+       mips_cpu_irq_init();
+
+       /* Set IRQ information in irq_desc */
+       for (irq = PNX833X_PIC_IRQ_BASE; irq < (PNX833X_PIC_IRQ_BASE + PNX833X_PIC_NUM_IRQ); irq++) {
+               pnx833x_hard_disable_pic_irq(irq);
+               set_irq_chip_and_handler(irq, &pnx833x_pic_irq_type, handle_simple_irq);
+       }
+
+       for (irq = PNX833X_GPIO_IRQ_BASE; irq < (PNX833X_GPIO_IRQ_BASE + PNX833X_GPIO_NUM_IRQ); irq++)
+               set_irq_chip_and_handler(irq, &pnx833x_gpio_irq_type, handle_simple_irq);
+
+       /* Set PIC priority limiter register to 0 */
+       PNX833X_PIC_INT_PRIORITY = 0;
+
+       /* Setup GPIO IRQ dispatching */
+       pnx833x_startup_pic_irq(PNX833X_PIC_GPIO_INT);
+
+       /* Enable PIC IRQs (HWIRQ2) */
+       if (cpu_has_vint)
+               set_vi_handler(4, pic_dispatch);
+
+       write_c0_status(read_c0_status() | IE_IRQ2);
+}
+
+unsigned int __cpuinit get_c0_compare_int(void)
+{
+       if (cpu_has_vint)
+               set_vi_handler(cp0_compare_irq, pnx833x_timer_dispatch);
+
+       mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
+       return mips_cpu_timer_irq;
+}
+
+void __init plat_time_init(void)
+{
+       /* calculate mips_hpt_frequency based on PNX833X_CLOCK_CPUCP_CTL reg */
+
+       extern unsigned long mips_hpt_frequency;
+       unsigned long reg = PNX833X_CLOCK_CPUCP_CTL;
+
+       if (!(PNX833X_BIT(reg, CLOCK_CPUCP_CTL, EXIT_RESET))) {
+               /* Functional clock is disabled so use crystal frequency */
+               mips_hpt_frequency = 25;
+       } else {
+#if defined(CONFIG_SOC_PNX8335)
+               /* Functional clock is enabled, so get clock multiplier */
+               mips_hpt_frequency = 90 + (10 * PNX8335_REGFIELD(CLOCK_PLL_CPU_CTL, FREQ));
+#else
+               static const unsigned long int freq[4] = {240, 160, 120, 80};
+               mips_hpt_frequency = freq[PNX833X_FIELD(reg, CLOCK_CPUCP_CTL, DIV_CLOCK)];
+#endif
+       }
+
+       printk(KERN_INFO "CPU clock is %ld MHz\n", mips_hpt_frequency);
+
+       mips_hpt_frequency *= 500000;
+}
+
diff --git a/arch/mips/nxp/pnx833x/common/platform.c b/arch/mips/nxp/pnx833x/common/platform.c
new file mode 100644 (file)
index 0000000..b1ccbcc
--- /dev/null
@@ -0,0 +1,319 @@
+/*
+ *  platform.c: platform support for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  Based on software written by:
+ *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/device.h>
+#include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/resource.h>
+#include <linux/serial.h>
+#include <linux/serial_pnx8xxx.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+
+#ifdef CONFIG_I2C_PNX0105
+/* Until i2c driver available in kernel.*/
+#include <linux/i2c-pnx0105.h>
+#endif
+
+#include <irq.h>
+#include <irq-mapping.h>
+#include <pnx833x.h>
+
+static u64 uart_dmamask     = DMA_32BIT_MASK;
+
+static struct resource pnx833x_uart_resources[] = {
+       [0] = {
+               .start          = PNX833X_UART0_PORTS_START,
+               .end            = PNX833X_UART0_PORTS_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = PNX833X_PIC_UART0_INT,
+               .end            = PNX833X_PIC_UART0_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start          = PNX833X_UART1_PORTS_START,
+               .end            = PNX833X_UART1_PORTS_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       [3] = {
+               .start          = PNX833X_PIC_UART1_INT,
+               .end            = PNX833X_PIC_UART1_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+struct pnx8xxx_port pnx8xxx_ports[] = {
+       [0] = {
+               .port   = {
+                       .type           = PORT_PNX8XXX,
+                       .iotype         = UPIO_MEM,
+                       .membase        = (void __iomem *)PNX833X_UART0_PORTS_START,
+                       .mapbase        = PNX833X_UART0_PORTS_START,
+                       .irq            = PNX833X_PIC_UART0_INT,
+                       .uartclk        = 3692300,
+                       .fifosize       = 16,
+                       .flags          = UPF_BOOT_AUTOCONF,
+                       .line           = 0,
+               },
+       },
+       [1] = {
+               .port   = {
+                       .type           = PORT_PNX8XXX,
+                       .iotype         = UPIO_MEM,
+                       .membase        = (void __iomem *)PNX833X_UART1_PORTS_START,
+                       .mapbase        = PNX833X_UART1_PORTS_START,
+                       .irq            = PNX833X_PIC_UART1_INT,
+                       .uartclk        = 3692300,
+                       .fifosize       = 16,
+                       .flags          = UPF_BOOT_AUTOCONF,
+                       .line           = 1,
+               },
+       },
+};
+
+static struct platform_device pnx833x_uart_device = {
+       .name           = "pnx8xxx-uart",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = &uart_dmamask,
+               .coherent_dma_mask      = DMA_32BIT_MASK,
+               .platform_data          = pnx8xxx_ports,
+       },
+       .num_resources  = ARRAY_SIZE(pnx833x_uart_resources),
+       .resource       = pnx833x_uart_resources,
+};
+
+static u64 ehci_dmamask     = DMA_32BIT_MASK;
+
+static struct resource pnx833x_usb_ehci_resources[] = {
+       [0] = {
+               .start          = PNX833X_USB_PORTS_START,
+               .end            = PNX833X_USB_PORTS_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = PNX833X_PIC_USB_INT,
+               .end            = PNX833X_PIC_USB_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device pnx833x_usb_ehci_device = {
+       .name           = "pnx833x-ehci",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = &ehci_dmamask,
+               .coherent_dma_mask      = DMA_32BIT_MASK,
+       },
+       .num_resources  = ARRAY_SIZE(pnx833x_usb_ehci_resources),
+       .resource       = pnx833x_usb_ehci_resources,
+};
+
+#ifdef CONFIG_I2C_PNX0105
+static struct resource pnx833x_i2c0_resources[] = {
+       {
+               .start          = PNX833X_I2C0_PORTS_START,
+               .end            = PNX833X_I2C0_PORTS_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = PNX833X_PIC_I2C0_INT,
+               .end            = PNX833X_PIC_I2C0_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct resource pnx833x_i2c1_resources[] = {
+       {
+               .start          = PNX833X_I2C1_PORTS_START,
+               .end            = PNX833X_I2C1_PORTS_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = PNX833X_PIC_I2C1_INT,
+               .end            = PNX833X_PIC_I2C1_INT,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct i2c_pnx0105_dev pnx833x_i2c_dev[] = {
+       {
+               .base = PNX833X_I2C0_PORTS_START,
+               .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */
+               .clock = 6,     /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Prefered HDCP) */
+               .bus_addr = 0,  /* no slave support */
+       },
+       {
+               .base = PNX833X_I2C1_PORTS_START,
+               .irq = -1,      /* on high freq, polling is faster */
+               /*.irq = PNX833X_PIC_I2C1_INT,*/
+               .clock = 4,     /* 0 == 400 kHz, 4 == 100 kHz. 100 kHz seems a safe default for now */
+               .bus_addr = 0,  /* no slave support */
+       },
+};
+
+static struct platform_device pnx833x_i2c0_device = {
+       .name           = "i2c-pnx0105",
+       .id             = 0,
+       .dev = {
+               .platform_data = &pnx833x_i2c_dev[0],
+       },
+       .num_resources  = ARRAY_SIZE(pnx833x_i2c0_resources),
+       .resource       = pnx833x_i2c0_resources,
+};
+
+static struct platform_device pnx833x_i2c1_device = {
+       .name           = "i2c-pnx0105",
+       .id             = 1,
+       .dev = {
+               .platform_data = &pnx833x_i2c_dev[1],
+       },
+       .num_resources  = ARRAY_SIZE(pnx833x_i2c1_resources),
+       .resource       = pnx833x_i2c1_resources,
+};
+#endif
+
+static u64 ethernet_dmamask = DMA_32BIT_MASK;
+
+static struct resource pnx833x_ethernet_resources[] = {
+       [0] = {
+               .start = PNX8335_IP3902_PORTS_START,
+               .end   = PNX8335_IP3902_PORTS_END,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = PNX8335_PIC_ETHERNET_INT,
+               .end   = PNX8335_PIC_ETHERNET_INT,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device pnx833x_ethernet_device = {
+       .name = "ip3902-eth",
+       .id   = -1,
+       .dev  = {
+               .dma_mask          = &ethernet_dmamask,
+               .coherent_dma_mask = DMA_32BIT_MASK,
+       },
+       .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
+       .resource      = pnx833x_ethernet_resources,
+};
+
+static struct resource pnx833x_sata_resources[] = {
+       [0] = {
+               .start = PNX8335_SATA_PORTS_START,
+               .end   = PNX8335_SATA_PORTS_END,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = PNX8335_PIC_SATA_INT,
+               .end   = PNX8335_PIC_SATA_INT,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device pnx833x_sata_device = {
+       .name          = "pnx833x-sata",
+       .id            = -1,
+       .num_resources = ARRAY_SIZE(pnx833x_sata_resources),
+       .resource      = pnx833x_sata_resources,
+};
+
+static const char *part_probes[] = {
+       "cmdlinepart",
+       NULL
+};
+
+static void
+pnx833x_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+{
+       struct nand_chip *this = mtd->priv;
+       unsigned long nandaddr = (unsigned long)this->IO_ADDR_W;
+
+       if (cmd == NAND_CMD_NONE)
+               return;
+
+       if (ctrl & NAND_CLE)
+               writeb(cmd, (void __iomem *)(nandaddr + PNX8335_NAND_CLE_MASK));
+       else
+               writeb(cmd, (void __iomem *)(nandaddr + PNX8335_NAND_ALE_MASK));
+}
+
+static struct platform_nand_data pnx833x_flash_nand_data = {
+       .chip = {
+               .chip_delay             = 25,
+               .part_probe_types       = part_probes,
+       },
+       .ctrl = {
+               .cmd_ctrl               = pnx833x_flash_nand_cmd_ctrl
+       }
+};
+
+/*
+ * Set start to be the correct address (PNX8335_NAND_BASE with no 0xb!!),
+ * 12 bytes more seems to be the standard that allows for NAND access.
+ */
+static struct resource pnx833x_flash_nand_resource = {
+       .start  = PNX8335_NAND_BASE,
+       .end    = PNX8335_NAND_BASE + 12,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct platform_device pnx833x_flash_nand = {
+       .name           = "gen_nand",
+       .id                     = -1,
+       .num_resources  = 1,
+       .resource           = &pnx833x_flash_nand_resource,
+       .dev            = {
+               .platform_data = &pnx833x_flash_nand_data,
+       },
+};
+
+static struct platform_device *pnx833x_platform_devices[] __initdata = {
+       &pnx833x_uart_device,
+       &pnx833x_usb_ehci_device,
+#ifdef CONFIG_I2C_PNX0105
+       &pnx833x_i2c0_device,
+       &pnx833x_i2c1_device,
+#endif
+       &pnx833x_ethernet_device,
+       &pnx833x_sata_device,
+       &pnx833x_flash_nand,
+};
+
+static int __init pnx833x_platform_init(void)
+{
+       int res;
+
+       res = platform_add_devices(pnx833x_platform_devices,
+                                  ARRAY_SIZE(pnx833x_platform_devices));
+
+       return res;
+}
+
+arch_initcall(pnx833x_platform_init);
diff --git a/arch/mips/nxp/pnx833x/common/prom.c b/arch/mips/nxp/pnx833x/common/prom.c
new file mode 100644 (file)
index 0000000..2a41e8f
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *  prom.c:
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  Based on software written by:
+ *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/init.h>
+#include <asm/bootinfo.h>
+#include <linux/string.h>
+
+void __init prom_init_cmdline(void)
+{
+       int argc = fw_arg0;
+       char **argv = (char **)fw_arg1;
+       char *c = &(arcs_cmdline[0]);
+       int i;
+
+       for (i = 1; i < argc; i++) {
+               strcpy(c, argv[i]);
+               c += strlen(argv[i]);
+               if (i < argc-1)
+                       *c++ = ' ';
+       }
+       *c = 0;
+}
+
+char __init *prom_getenv(char *envname)
+{
+       extern char **prom_envp;
+       char **env = prom_envp;
+       int i;
+
+       i = strlen(envname);
+
+       while (*env) {
+               if (strncmp(envname, *env, i) == 0 && *(*env+i) == '=')
+                       return *env + i + 1;
+               env++;
+       }
+
+       return 0;
+}
+
+void __init prom_free_prom_memory(void)
+{
+}
+
+char * __init prom_getcmdline(void)
+{
+       return arcs_cmdline;
+}
+
diff --git a/arch/mips/nxp/pnx833x/common/reset.c b/arch/mips/nxp/pnx833x/common/reset.c
new file mode 100644 (file)
index 0000000..a9bc9ba
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ *  reset.c: reset support for PNX833X.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  Based on software written by:
+ *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/slab.h>
+#include <linux/reboot.h>
+#include <pnx833x.h>
+
+void pnx833x_machine_restart(char *command)
+{
+       PNX833X_RESET_CONTROL_2 = 0;
+       PNX833X_RESET_CONTROL = 0;
+}
+
+void pnx833x_machine_halt(void)
+{
+       while (1)
+               __asm__ __volatile__ ("wait");
+
+}
+
+void pnx833x_machine_power_off(void)
+{
+       pnx833x_machine_halt();
+}
diff --git a/arch/mips/nxp/pnx833x/common/setup.c b/arch/mips/nxp/pnx833x/common/setup.c
new file mode 100644 (file)
index 0000000..e51fbc4
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ *  setup.c: Setup PNX833X Soc.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  Based on software written by:
+ *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <linux/io.h>
+#include <linux/pci.h>
+#include <asm/reboot.h>
+#include <pnx833x.h>
+#include <gpio.h>
+
+extern void pnx833x_board_setup(void);
+extern void pnx833x_machine_restart(char *);
+extern void pnx833x_machine_halt(void);
+extern void pnx833x_machine_power_off(void);
+
+int __init plat_mem_setup(void)
+{
+       /* fake pci bus to avoid bounce buffers */
+       PCI_DMA_BUS_IS_PHYS = 1;
+
+       /* set mips clock to 320MHz */
+#if defined(CONFIG_SOC_PNX8335)
+       PNX8335_WRITEFIELD(0x17, CLOCK_PLL_CPU_CTL, FREQ);
+#endif
+       pnx833x_gpio_init();    /* so it will be ready in board_setup() */
+
+       pnx833x_board_setup();
+
+       _machine_restart = pnx833x_machine_restart;
+       _machine_halt = pnx833x_machine_halt;
+       pm_power_off = pnx833x_machine_power_off;
+
+       /* IO/MEM resources. */
+       set_io_port_base(KSEG1);
+       ioport_resource.start = 0;
+       ioport_resource.end = ~0;
+       iomem_resource.start = 0;
+       iomem_resource.end = ~0;
+
+       return 0;
+}
diff --git a/arch/mips/nxp/pnx833x/stb22x/Makefile b/arch/mips/nxp/pnx833x/stb22x/Makefile
new file mode 100644 (file)
index 0000000..f81c580
--- /dev/null
@@ -0,0 +1,3 @@
+lib-y := board.o
+
+EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/nxp/pnx833x/stb22x/board.c b/arch/mips/nxp/pnx833x/stb22x/board.c
new file mode 100644 (file)
index 0000000..90cc604
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ *  board.c: STB225 board support.
+ *
+ *  Copyright 2008 NXP Semiconductors
+ *       Chris Steel <chris.steel@nxp.com>
+ *    Daniel Laird <daniel.j.laird@nxp.com>
+ *
+ *  Based on software written by:
+ *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/init.h>
+#include <asm/bootinfo.h>
+#include <linux/mm.h>
+#include <pnx833x.h>
+#include <gpio.h>
+
+/* endianess twiddlers */
+#define PNX8335_DEBUG0 0x4400
+#define PNX8335_DEBUG1 0x4404
+#define PNX8335_DEBUG2 0x4408
+#define PNX8335_DEBUG3 0x440c
+#define PNX8335_DEBUG4 0x4410
+#define PNX8335_DEBUG5 0x4414
+#define PNX8335_DEBUG6 0x4418
+#define PNX8335_DEBUG7 0x441c
+
+int prom_argc;
+char **prom_argv = 0, **prom_envp = 0;
+
+extern void prom_init_cmdline(void);
+extern char *prom_getenv(char *envname);
+
+const char *get_system_type(void)
+{
+       return "NXP STB22x";
+}
+
+static inline unsigned long env_or_default(char *env, unsigned long dfl)
+{
+       char *str = prom_getenv(env);
+       return str ? simple_strtol(str, 0, 0) : dfl;
+}
+
+void __init prom_init(void)
+{
+       unsigned long memsize;
+
+       prom_argc = fw_arg0;
+       prom_argv = (char **)fw_arg1;
+       prom_envp = (char **)fw_arg2;
+
+       prom_init_cmdline();
+
+       memsize = env_or_default("memsize", 0x02000000);
+       add_memory_region(0, memsize, BOOT_MEM_RAM);
+}
+
+void __init pnx833x_board_setup(void)
+{
+       pnx833x_gpio_select_function_alt(4);
+       pnx833x_gpio_select_output(4);
+       pnx833x_gpio_select_function_alt(5);
+       pnx833x_gpio_select_input(5);
+       pnx833x_gpio_select_function_alt(6);
+       pnx833x_gpio_select_input(6);
+       pnx833x_gpio_select_function_alt(7);
+       pnx833x_gpio_select_output(7);
+
+       pnx833x_gpio_select_function_alt(25);
+       pnx833x_gpio_select_function_alt(26);
+
+       pnx833x_gpio_select_function_alt(27);
+       pnx833x_gpio_select_function_alt(28);
+       pnx833x_gpio_select_function_alt(29);
+       pnx833x_gpio_select_function_alt(30);
+       pnx833x_gpio_select_function_alt(31);
+       pnx833x_gpio_select_function_alt(32);
+       pnx833x_gpio_select_function_alt(33);
+
+#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
+       /* Setup MIU for NAND access on CS0...
+        *
+        * (it seems that we must also configure CS1 for reliable operation,
+        * otherwise the first read ID command will fail if it's read as 4 bytes
+        * but pass if it's read as 1 word.)
+        */
+
+       /* Setup MIU CS0 & CS1 timing */
+       PNX833X_MIU_SEL0 = 0;
+       PNX833X_MIU_SEL1 = 0;
+       PNX833X_MIU_SEL0_TIMING = 0x50003081;
+       PNX833X_MIU_SEL1_TIMING = 0x50003081;
+
+       /* Setup GPIO 00 for use as MIU CS1 (CS0 is not multiplexed, so does not need this) */
+       pnx833x_gpio_select_function_alt(0);
+
+       /* Setup GPIO 04 to input NAND read/busy signal */
+       pnx833x_gpio_select_function_io(4);
+       pnx833x_gpio_select_input(4);
+
+       /* Setup GPIO 05 to disable NAND write protect */
+       pnx833x_gpio_select_function_io(5);
+       pnx833x_gpio_select_output(5);
+       pnx833x_gpio_write(1, 5);
+
+#elif defined(CONFIG_MTD_CFI) || defined(CONFIG_MTD_CFI_MODULE)
+
+       /* Set up MIU for 16-bit NOR access on CS0 and CS1... */
+
+       /* Setup MIU CS0 & CS1 timing */
+       PNX833X_MIU_SEL0 = 1;
+       PNX833X_MIU_SEL1 = 1;
+       PNX833X_MIU_SEL0_TIMING = 0x6A08D082;
+       PNX833X_MIU_SEL1_TIMING = 0x6A08D082;
+
+       /* Setup GPIO 00 for use as MIU CS1 (CS0 is not multiplexed, so does not need this) */
+       pnx833x_gpio_select_function_alt(0);
+#endif
+}
index b1886244cedf1d29c231d4df8963bff8c158c959..e8a97f59e0661e585fc40565212d0e7d74130d1f 100644 (file)
@@ -13,7 +13,7 @@ obj-$(CONFIG_MIPS_MSC)                += ops-msc.o
 obj-$(CONFIG_MIPS_NILE4)       += ops-nile4.o
 obj-$(CONFIG_SOC_TX3927)       += ops-tx3927.o
 obj-$(CONFIG_PCI_VR41XX)       += ops-vr41xx.o pci-vr41xx.o
-obj-$(CONFIG_MARKEINS)         += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
+obj-$(CONFIG_NEC_MARKEINS)     += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o
 obj-$(CONFIG_PCI_TX4927)       += ops-tx4927.o
 obj-$(CONFIG_BCM47XX)          += pci-bcm47xx.o
 
index 846eae9cdd051cbc2fbf6f9d007ca4fc217d152d..fba5aad00d513566aa368d774761d0da77658bfa 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <asm/bootinfo.h>
 
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 #define EMMA2RH_PCI_HOST_SLOT 0x09
 #define EMMA2RH_USB_SLOT 0x03
index 75b90dcb7a090209906bf3bb19d7fe7b73c8cab5..3d86823d03a0a5cc158f8d2d7c2bbe7374ee5ca5 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/init.h>
 
 #include <asm/mach-rc32434/rc32434.h>
+#include <asm/mach-rc32434/irq.h>
 
 static int __devinitdata irq_map[2][12] = {
        {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1},
index d31bfc6d4150fd43195345d258147e3f5f6c849e..5947a70b0b7fca38135209bad0e1ed33042cf09b 100644 (file)
@@ -30,7 +30,7 @@
 #include <asm/addrspace.h>
 #include <asm/debug.h>
 
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 #define RTABORT (0x1<<9)
 #define RMABORT (0x1<<10)
index 772e283daa63c5115b7ca429f86164f49e87bf19..2df4190232cd4163a3afccc5de8e2d50bd9af91b 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <asm/bootinfo.h>
 
-#include <asm/emma2rh/emma2rh.h>
+#include <asm/emma/emma2rh.h>
 
 static struct resource pci_io_resource = {
        .name = "pci IO space",
index 31619c601b113632b6f47aa5beb4603f01785653..2f22d714d5b09487c5535f49cce0018dcda4d070 100644 (file)
@@ -280,7 +280,7 @@ static int __init plat_setup_devices(void)
 {
        /* Look for the CF card reader */
        if (!readl(IDT434_REG_BASE + DEV1MASK))
-               rb532_devs[1] = NULL;
+               rb532_devs[2] = NULL;   /* disable cf_slot0 at index 2 */
        else {
                cf_slot0_res[0].start =
                    readl(IDT434_REG_BASE + DEV1BASE);
index 76a7fd96d5647212005c4ecf7bf80a2020774d54..70c4a6726377ded624a426ca683df1511dd62bc2 100644 (file)
@@ -310,6 +310,10 @@ int __init rb532_gpio_init(void)
                return -ENXIO;
        }
 
+       /* Set the interrupt status and level for the CF pin */
+       rb532_gpio_set_int_level(&rb532_gpio_chip->chip, CF_GPIO_NUM, 1);
+       rb532_gpio_set_int_status(&rb532_gpio_chip->chip, CF_GPIO_NUM, 0);
+
        return 0;
 }
 arch_initcall(rb532_gpio_init);
index f6d9bf4b26e7fdcda9cc336f83a5e87a5f10e2c5..f8b18af141a19c5e82ee6c4c543f533dec0bea9a 100644 (file)
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/irq.h>
 
-#include <asm/mipsregs.h>
-#include <asm/addrspace.h>
 #include <asm/irq_cpu.h>
-#include <asm/sgi/ioc.h>
 #include <asm/sgi/hpc3.h>
 #include <asm/sgi/ip22.h>
-#include <asm/time.h>
-
-/* #define DEBUG_SGINT */
 
 /* So far nothing hangs here */
 #undef USE_LIO3_IRQ
@@ -68,7 +59,7 @@ static void enable_local1_irq(unsigned int irq)
                sgint->imask1 |= (1 << (irq - SGINT_LOCAL1));
 }
 
-void disable_local1_irq(unsigned int irq)
+static void disable_local1_irq(unsigned int irq)
 {
        sgint->imask1 &= ~(1 << (irq - SGINT_LOCAL1));
 }
@@ -87,7 +78,7 @@ static void enable_local2_irq(unsigned int irq)
        sgint->cmeimask0 |= (1 << (irq - SGINT_LOCAL2));
 }
 
-void disable_local2_irq(unsigned int irq)
+static void disable_local2_irq(unsigned int irq)
 {
        sgint->cmeimask0 &= ~(1 << (irq - SGINT_LOCAL2));
        if (!sgint->cmeimask0)
@@ -108,7 +99,7 @@ static void enable_local3_irq(unsigned int irq)
        sgint->cmeimask1 |= (1 << (irq - SGINT_LOCAL3));
 }
 
-void disable_local3_irq(unsigned int irq)
+static void disable_local3_irq(unsigned int irq)
 {
        sgint->cmeimask1 &= ~(1 << (irq - SGINT_LOCAL3));
        if (!sgint->cmeimask1)
@@ -344,6 +335,6 @@ void __init arch_init_irq(void)
 
 #ifdef CONFIG_EISA
        if (ip22_is_fullhouse())        /* Only Indigo-2 has EISA stuff */
-               ip22_eisa_init();
+               ip22_eisa_init();
 #endif
 }
index 17052db4161d329a7b644c59d3a3c8eb0a260d7c..226e8bb2f0a1bb6336e9b5ce64352bdfaec666d5 100644 (file)
@@ -46,9 +46,10 @@ config TOSHIBA_RBTX4938
          support this machine type
 
 config TOSHIBA_RBTX4939
-       bool "Toshiba RBTX4939 bobard"
+       bool "Toshiba RBTX4939 board"
        depends on MACH_TX49XX
        select SOC_TX4939
+       select TXX9_7SEGLED
        help
          This Toshiba board is based on the TX4939 processor. Say Y here to
          support this machine type
@@ -86,6 +87,9 @@ config SOC_TX4939
        select HW_HAS_PCI
        select PCI_TX4927
 
+config TXX9_7SEGLED
+       bool
+
 config TOSHIBA_FPCIB0
        bool "FPCIB0 Backplane Support"
        depends on PCI && MACH_TXX9
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c
new file mode 100644 (file)
index 0000000..727ab21
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 7 Segment LED routines
+ * Based on RBTX49xx patch from CELF patch archive.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * (C) Copyright TOSHIBA CORPORATION 2005-2007
+ * All Rights Reserved.
+ */
+#include <linux/sysdev.h>
+#include <linux/slab.h>
+#include <linux/map_to_7segment.h>
+#include <asm/txx9/generic.h>
+
+static unsigned int tx_7segled_num;
+static void (*tx_7segled_putc)(unsigned int pos, unsigned char val);
+
+void __init txx9_7segled_init(unsigned int num,
+                             void (*putc)(unsigned int pos, unsigned char val))
+{
+       tx_7segled_num = num;
+       tx_7segled_putc = putc;
+}
+
+static SEG7_CONVERSION_MAP(txx9_seg7map, MAP_ASCII7SEG_ALPHANUM_LC);
+
+int txx9_7segled_putc(unsigned int pos, char c)
+{
+       if (pos >= tx_7segled_num)
+               return -EINVAL;
+       c = map_to_seg7(&txx9_seg7map, c);
+       if (c < 0)
+               return c;
+       tx_7segled_putc(pos, c);
+       return 0;
+}
+
+static ssize_t ascii_store(struct sys_device *dev,
+                          struct sysdev_attribute *attr,
+                          const char *buf, size_t size)
+{
+       unsigned int ch = dev->id;
+       txx9_7segled_putc(ch, buf[0]);
+       return size;
+}
+
+static ssize_t raw_store(struct sys_device *dev,
+                        struct sysdev_attribute *attr,
+                        const char *buf, size_t size)
+{
+       unsigned int ch = dev->id;
+       tx_7segled_putc(ch, buf[0]);
+       return size;
+}
+
+static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store);
+static SYSDEV_ATTR(raw, 0200, NULL, raw_store);
+
+static ssize_t map_seg7_show(struct sysdev_class *class, char *buf)
+{
+       memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map));
+       return sizeof(txx9_seg7map);
+}
+
+static ssize_t map_seg7_store(struct sysdev_class *class,
+                             const char *buf, size_t size)
+{
+       if (size != sizeof(txx9_seg7map))
+               return -EINVAL;
+       memcpy(&txx9_seg7map, buf, size);
+       return size;
+}
+
+static SYSDEV_CLASS_ATTR(map_seg7, 0600, map_seg7_show, map_seg7_store);
+
+static struct sysdev_class tx_7segled_sysdev_class = {
+       .name   = "7segled",
+};
+
+static int __init tx_7segled_init_sysfs(void)
+{
+       int error, i;
+       if (!tx_7segled_num)
+               return -ENODEV;
+       error = sysdev_class_register(&tx_7segled_sysdev_class);
+       if (error)
+               return error;
+       error = sysdev_class_create_file(&tx_7segled_sysdev_class,
+                                        &attr_map_seg7);
+       if (error)
+               return error;
+       for (i = 0; i < tx_7segled_num; i++) {
+               struct sys_device *dev;
+               dev = kzalloc(sizeof(*dev), GFP_KERNEL);
+               if (!dev) {
+                       error = -ENODEV;
+                       break;
+               }
+               dev->id = i;
+               dev->cls = &tx_7segled_sysdev_class;
+               error = sysdev_register(dev);
+               if (!error) {
+                       sysdev_create_file(dev, &attr_ascii);
+                       sysdev_create_file(dev, &attr_raw);
+               }
+       }
+       return error;
+}
+
+device_initcall(tx_7segled_init_sysfs);
index 0030d23bef5b033f6d733690806ae80b04d7b3b3..f2579ce054a1b5bc2fa2452db5e4be2203b0894d 100644 (file)
@@ -10,5 +10,6 @@ obj-$(CONFIG_SOC_TX4938)      += mem_tx4927.o setup_tx4938.o irq_tx4938.o
 obj-$(CONFIG_SOC_TX4939)       += setup_tx4939.o irq_tx4939.o
 obj-$(CONFIG_TOSHIBA_FPCIB0)   += smsc_fdc37m81x.o
 obj-$(CONFIG_SPI)              += spi_eeprom.o
+obj-$(CONFIG_TXX9_7SEGLED)     += 7segled.o
 
 EXTRA_CFLAGS += -Werror
index 5526375010f8d952d465757b3f6de06bae338071..a13a08b8c9ec1c24ba9292fe377083f2f70c2e43 100644 (file)
@@ -156,11 +156,23 @@ static struct txx9_board_vec *__init find_board_byname(const char *name)
 
 static void __init prom_init_cmdline(void)
 {
-       int argc = (int)fw_arg0;
-       int *argv32 = (int *)fw_arg1;
+       int argc;
+       int *argv32;
        int i;                  /* Always ignore the "-c" at argv[0] */
        char builtin[CL_SIZE];
 
+       if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) {
+               /*
+                * argc is not a valid number, or argv32 is not a valid
+                * pointer
+                */
+               argc = 0;
+               argv32 = NULL;
+       } else {
+               argc = (int)fw_arg0;
+               argv32 = (int *)fw_arg1;
+       }
+
        /* ignore all built-in args if any f/w args given */
        /*
         * But if built-in strings was started with '+', append them
@@ -414,10 +426,12 @@ char * __init prom_getcmdline(void)
 
 const char *__init prom_getenv(const char *name)
 {
-       const s32 *str = (const s32 *)fw_arg2;
+       const s32 *str;
 
-       if (!str)
+       if (fw_arg2 < CKSEG0)
                return NULL;
+
+       str = (const s32 *)fw_arg2;
        /* YAMON style ("name", "value" pairs) */
        while (str[0] && str[1]) {
                if (!strcmp((const char *)(unsigned long)str[0], name))
@@ -622,6 +636,21 @@ unsigned long (*__swizzle_addr_b)(unsigned long port) = __swizzle_addr_none;
 EXPORT_SYMBOL(__swizzle_addr_b);
 #endif
 
+#ifdef NEEDS_TXX9_IOSWABW
+static u16 ioswabw_default(volatile u16 *a, u16 x)
+{
+       return le16_to_cpu(x);
+}
+static u16 __mem_ioswabw_default(volatile u16 *a, u16 x)
+{
+       return x;
+}
+u16 (*ioswabw)(volatile u16 *a, u16 x) = ioswabw_default;
+EXPORT_SYMBOL(ioswabw);
+u16 (*__mem_ioswabw)(volatile u16 *a, u16 x) = __mem_ioswabw_default;
+EXPORT_SYMBOL(__mem_ioswabw);
+#endif
+
 void __init txx9_physmap_flash_init(int no, unsigned long addr,
                                    unsigned long size,
                                    const struct physmap_flash_data *pdata)
index 9855d7bccc203f628186d5d2f31fa4e37f67a491..6daee9b1cd5e02a460bb2b60b6cf2ecdd6ec9a0c 100644 (file)
@@ -14,6 +14,8 @@
 #include <linux/types.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
+#include <linux/interrupt.h>
+#include <linux/smc91x.h>
 #include <asm/reboot.h>
 #include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
@@ -33,6 +35,21 @@ static void __init rbtx4939_time_init(void)
        tx4939_time_init(0);
 }
 
+#if defined(__BIG_ENDIAN) && \
+       (defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE))
+#define HAVE_RBTX4939_IOSWAB
+#define IS_CE1_ADDR(addr) \
+       ((((unsigned long)(addr) - IO_BASE) & 0xfff00000) == TXX9_CE(1))
+static u16 rbtx4939_ioswabw(volatile u16 *a, u16 x)
+{
+       return IS_CE1_ADDR(a) ? x : le16_to_cpu(x);
+}
+static u16 rbtx4939_mem_ioswabw(volatile u16 *a, u16 x)
+{
+       return !IS_CE1_ADDR(a) ? x : le16_to_cpu(x);
+}
+#endif /* __BIG_ENDIAN && CONFIG_SMC91X */
+
 static void __init rbtx4939_pci_setup(void)
 {
 #ifdef CONFIG_PCI
@@ -239,6 +256,32 @@ static inline void rbtx4939_led_setup(void)
 }
 #endif
 
+static void __rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
+{
+#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
+       unsigned long flags;
+       local_irq_save(flags);
+       /* bit7: reserved for LED class */
+       led_val[pos] = (led_val[pos] & 0x80) | (val & 0x7f);
+       val = led_val[pos];
+       local_irq_restore(flags);
+#endif
+       writeb(val, rbtx4939_7seg_addr(pos / 4, pos % 4));
+}
+
+static void rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
+{
+       /* convert from map_to_seg7() notation */
+       val = (val & 0x88) |
+               ((val & 0x40) >> 6) |
+               ((val & 0x20) >> 4) |
+               ((val & 0x10) >> 2) |
+               ((val & 0x04) << 2) |
+               ((val & 0x02) << 4) |
+               ((val & 0x01) << 6);
+       __rbtx4939_7segled_putc(pos, val);
+}
+
 static void __init rbtx4939_arch_init(void)
 {
        rbtx4939_pci_setup();
@@ -246,6 +289,22 @@ static void __init rbtx4939_arch_init(void)
 
 static void __init rbtx4939_device_init(void)
 {
+       unsigned long smc_addr = RBTX4939_ETHER_ADDR - IO_BASE;
+       struct resource smc_res[] = {
+               {
+                       .start  = smc_addr,
+                       .end    = smc_addr + 0x10 - 1,
+                       .flags  = IORESOURCE_MEM,
+               }, {
+                       .start  = RBTX4939_IRQ_ETHER,
+                       /* override default irq flag defined in smc91x.h */
+                       .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
+               },
+       };
+       struct smc91x_platdata smc_pdata = {
+               .flags = SMC91X_USE_16BIT,
+       };
+       struct platform_device *pdev;
 #if defined(CONFIG_TC35815) || defined(CONFIG_TC35815_MODULE)
        int i, j;
        unsigned char ethaddr[2][6];
@@ -262,6 +321,12 @@ static void __init rbtx4939_device_init(void)
        }
        tx4939_ethaddr_init(ethaddr[0], ethaddr[1]);
 #endif
+       pdev = platform_device_alloc("smc91x", -1);
+       if (!pdev ||
+           platform_device_add_resources(pdev, smc_res, ARRAY_SIZE(smc_res)) ||
+           platform_device_add_data(pdev, &smc_pdata, sizeof(smc_pdata)) ||
+           platform_device_add(pdev))
+               platform_device_put(pdev);
        rbtx4939_led_setup();
        tx4939_wdt_init();
        tx4939_ata_init();
@@ -269,6 +334,8 @@ static void __init rbtx4939_device_init(void)
 
 static void __init rbtx4939_setup(void)
 {
+       int i;
+
        rbtx4939_ebusc_setup();
        /* always enable ATA0 */
        txx9_set64(&tx4939_ccfgptr->pcfg, TX4939_PCFG_ATA0MODE);
@@ -276,9 +343,16 @@ static void __init rbtx4939_setup(void)
        if (txx9_master_clock == 0)
                txx9_master_clock = 20000000;
        tx4939_setup();
+#ifdef HAVE_RBTX4939_IOSWAB
+       ioswabw = rbtx4939_ioswabw;
+       __mem_ioswabw = rbtx4939_mem_ioswabw;
+#endif
 
        _machine_restart = rbtx4939_machine_restart;
 
+       txx9_7segled_init(RBTX4939_MAX_7SEGLEDS, rbtx4939_7segled_putc);
+       for (i = 0; i < RBTX4939_MAX_7SEGLEDS; i++)
+               txx9_7segled_putc(i, '-');
        pr_info("RBTX4939 (Rev %02x) --- FPGA(Rev %02x) DIPSW:%02x,%02x\n",
                readb(rbtx4939_board_rev_addr), readb(rbtx4939_ioc_rev_addr),
                readb(rbtx4939_udipsw_addr), readb(rbtx4939_bdipsw_addr));
index 1f409bf81809b12af3300b0b3c4f49b2f94d2a34..3a74ed62ec89b846e2806daefad57eb7a4fbf8bc 100644 (file)
@@ -2,7 +2,7 @@
 # arch/sh/Makefile
 #
 # Copyright (C) 1999  Kaz Kojima
-# Copyright (C) 2002, 2003, 2004  Paul Mundt
+# Copyright (C) 2002 - 2008  Paul Mundt
 # Copyright (C) 2002  M. R. Brown
 #
 # This file is subject to the terms and conditions of the GNU General Public
@@ -20,14 +20,6 @@ isa-$(CONFIG_CPU_SH4AL_DSP)          := sh4al
 isa-$(CONFIG_CPU_SH5)                  := shmedia
 isa-$(CONFIG_SH_DSP)                   := $(isa-y)-dsp
 
-ifndef CONFIG_SH_DSP
-ifndef CONFIG_SH_FPU
-isa-y                  := $(isa-y)-nofpu
-endif
-endif
-
-isa-y                  := $(isa-y)-up
-
 cflags-$(CONFIG_CPU_SH2)               := $(call cc-option,-m2,)
 cflags-$(CONFIG_CPU_SH2A)              += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,)
@@ -38,6 +30,22 @@ cflags-$(CONFIG_CPU_SH4A)            += $(call cc-option,-m4a,) \
                                           $(call cc-option,-m4a-nofpu,)
 cflags-$(CONFIG_CPU_SH5)               := $(call cc-option,-m5-32media-nofpu,)
 
+ifeq ($(cflags-y),)
+#
+# In the case where we are stuck with a compiler that has been uselessly
+# restricted to a particular ISA, a favourite default of newer GCCs when
+# extensive multilib targets are not provided, ensure we get the best fit
+# regarding FP generation. This is necessary to avoid references to FP
+# variants in libgcc where integer variants exist, which otherwise result
+# in link errors. This is intentionally stupid (albeit many orders of
+# magnitude less than GCC's default behaviour), as anything with a large
+# number of multilib targets better have been built correctly for
+# the target in mind.
+#
+cflags-y       += $(shell $(CC) $(KBUILD_CFLAGS) -print-multi-lib | \
+                    grep nofpu | sed q | sed -e 's/^/-/;s/;.*$$//')
+endif
+
 cflags-$(CONFIG_CPU_BIG_ENDIAN)                += -mb
 cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += -ml
 
@@ -65,7 +73,8 @@ OBJCOPYFLAGS  := -O binary -R .note -R .note.gnu.build-id -R .comment \
                   -R .stab -R .stabstr -S
 
 # Give the various platforms the opportunity to set default image types
-defaultimage-$(CONFIG_SUPERH32)        := zImage
+defaultimage-$(CONFIG_SUPERH32)                        := zImage
+defaultimage-$(CONFIG_SH_SH7785LCR)            := uImage
 
 # Set some sensible Kbuild defaults
 KBUILD_DEFCONFIG       := shx3_defconfig
diff --git a/arch/sh/configs/ul2_defconfig b/arch/sh/configs/ul2_defconfig
new file mode 100644 (file)
index 0000000..9afff67
--- /dev/null
@@ -0,0 +1,1169 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28-rc2
+# Tue Oct 28 17:35:17 2008
+#
+CONFIG_SUPERH=y
+CONFIG_SUPERH32=y
+CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_GENERIC_IRQ_PROBE=y
+# CONFIG_GENERIC_GPIO is not set
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_SYS_SUPPORTS_NUMA=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+# CONFIG_OPROFILE is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
+
+#
+# System type
+#
+CONFIG_CPU_SH4=y
+CONFIG_CPU_SH4A=y
+CONFIG_CPU_SH4AL_DSP=y
+CONFIG_CPU_SHX2=y
+# CONFIG_CPU_SUBTYPE_SH7619 is not set
+# CONFIG_CPU_SUBTYPE_SH7203 is not set
+# CONFIG_CPU_SUBTYPE_SH7206 is not set
+# CONFIG_CPU_SUBTYPE_SH7263 is not set
+# CONFIG_CPU_SUBTYPE_MXG is not set
+# CONFIG_CPU_SUBTYPE_SH7705 is not set
+# CONFIG_CPU_SUBTYPE_SH7706 is not set
+# CONFIG_CPU_SUBTYPE_SH7707 is not set
+# CONFIG_CPU_SUBTYPE_SH7708 is not set
+# CONFIG_CPU_SUBTYPE_SH7709 is not set
+# CONFIG_CPU_SUBTYPE_SH7710 is not set
+# CONFIG_CPU_SUBTYPE_SH7712 is not set
+# CONFIG_CPU_SUBTYPE_SH7720 is not set
+# CONFIG_CPU_SUBTYPE_SH7721 is not set
+# CONFIG_CPU_SUBTYPE_SH7750 is not set
+# CONFIG_CPU_SUBTYPE_SH7091 is not set
+# CONFIG_CPU_SUBTYPE_SH7750R is not set
+# CONFIG_CPU_SUBTYPE_SH7750S is not set
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
+# CONFIG_CPU_SUBTYPE_SH7751R is not set
+# CONFIG_CPU_SUBTYPE_SH7760 is not set
+# CONFIG_CPU_SUBTYPE_SH4_202 is not set
+# CONFIG_CPU_SUBTYPE_SH7723 is not set
+# CONFIG_CPU_SUBTYPE_SH7763 is not set
+# CONFIG_CPU_SUBTYPE_SH7770 is not set
+# CONFIG_CPU_SUBTYPE_SH7780 is not set
+# CONFIG_CPU_SUBTYPE_SH7785 is not set
+# CONFIG_CPU_SUBTYPE_SHX3 is not set
+# CONFIG_CPU_SUBTYPE_SH7343 is not set
+# CONFIG_CPU_SUBTYPE_SH7722 is not set
+CONFIG_CPU_SUBTYPE_SH7366=y
+# CONFIG_CPU_SUBTYPE_SH5_101 is not set
+# CONFIG_CPU_SUBTYPE_SH5_103 is not set
+
+#
+# Memory management options
+#
+CONFIG_QUICKLIST=y
+CONFIG_MMU=y
+CONFIG_PAGE_OFFSET=0x80000000
+CONFIG_MEMORY_START=0x08000000
+CONFIG_MEMORY_SIZE=0x01f00000
+CONFIG_29BIT=y
+# CONFIG_X2TLB is not set
+CONFIG_VSYSCALL=y
+CONFIG_NUMA=y
+CONFIG_NODES_SHIFT=1
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_MAX_ACTIVE_REGIONS=1
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_ENTRY_OFFSET=0x00001000
+CONFIG_HUGETLB_PAGE_SIZE_64K=y
+# CONFIG_HUGETLB_PAGE_SIZE_256K is not set
+# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
+# CONFIG_HUGETLB_PAGE_SIZE_512MB is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_NEED_MULTIPLE_NODES=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_MEMORY_HOTPLUG is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_MIGRATION is not set
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_NR_QUICK=2
+CONFIG_UNEVICTABLE_LRU=y
+
+#
+# Cache configuration
+#
+# CONFIG_SH_DIRECT_MAPPED is not set
+CONFIG_CACHE_WRITEBACK=y
+# CONFIG_CACHE_WRITETHROUGH is not set
+# CONFIG_CACHE_OFF is not set
+
+#
+# Processor features
+#
+CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_CPU_BIG_ENDIAN is not set
+# CONFIG_SH_FPU_EMU is not set
+# CONFIG_SH_DSP is not set
+# CONFIG_SH_STORE_QUEUES is not set
+CONFIG_CPU_HAS_INTEVT=y
+CONFIG_CPU_HAS_SR_RB=y
+CONFIG_CPU_HAS_PTEA=y
+CONFIG_CPU_HAS_DSP=y
+
+#
+# Board support
+#
+
+#
+# Timer and clock configuration
+#
+CONFIG_SH_TMU=y
+CONFIG_SH_TIMER_IRQ=16
+CONFIG_SH_PCLK_FREQ=33333333
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# DMA support
+#
+# CONFIG_SH_DMA is not set
+
+#
+# Companion Chips
+#
+
+#
+# Additional SuperH Device Drivers
+#
+# CONFIG_HEARTBEAT is not set
+# CONFIG_PUSH_SWITCH is not set
+
+#
+# Kernel features
+#
+CONFIG_HZ_100=y
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=100
+CONFIG_SCHED_HRTICK=y
+CONFIG_KEXEC=y
+# CONFIG_CRASH_DUMP is not set
+# CONFIG_SECCOMP is not set
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+# CONFIG_PREEMPT_RCU is not set
+CONFIG_GUSA=y
+
+#
+# Boot options
+#
+CONFIG_ZERO_PAGE_OFFSET=0x00001000
+CONFIG_BOOT_LINK_OFFSET=0x00800000
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/nfs ip=dhcp"
+
+#
+# Bus options
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_NL80211=y
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_IEEE80211=m
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
+CONFIG_ATA_SFF=y
+# CONFIG_SATA_MV is not set
+CONFIG_PATA_PLATFORM=y
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_STNIC is not set
+# CONFIG_SMC91X is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=m
+# CONFIG_LIBERTAS_USB is not set
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_DEBUG=y
+# CONFIG_LIBERTAS_THINFIRM is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_ZD1211RW is not set
+# CONFIG_RT2X00 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=1
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_UNIX98_PTYS is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+CONFIG_USB_R8A66597_HCD=y
+# CONFIG_SUPERH_ON_CHIP_R8A66597 is not set
+# CONFIG_USB_HWA_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=y
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+CONFIG_NLS_CODEPAGE_932=y
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FTRACE=y
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_SH_STANDARD_BIOS is not set
+# CONFIG_EARLY_SCIF_CONSOLE is not set
+# CONFIG_SH_KGDB is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 25b1e6adfe8ca938a410fd7bea8b93f1f6c1aad8..95e6fb76c24d2b0df8940ca1cca251e29777aafe 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ASM_SH_CPU_SH4_RTC_H
 #define __ASM_SH_CPU_SH4_RTC_H
 
-#ifdef CONFIG_CPU_SUBTYPE_SH7723
+#if defined(CONFIG_CPU_SUBTYPE_SH7722) || defined(CONFIG_CPU_SUBTYPE_SH7723)
 #define rtc_reg_size           sizeof(u16)
 #else
 #define rtc_reg_size           sizeof(u32)
index de1ede92176e8a3253e6c23c2e45246e0eccef62..ef77ee1d9f5320705b66cdb92df38ddd8ebe04ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * SH7722 Setup
  *
- *  Copyright (C) 2006 - 2007  Paul Mundt
+ *  Copyright (C) 2006 - 2008  Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
 #include <asm/clock.h>
 #include <asm/mmzone.h>
 
+static struct resource rtc_resources[] = {
+       [0] = {
+               .start  = 0xa465fec0,
+               .end    = 0xa465fec0 + 0x58 - 1,
+               .flags  = IORESOURCE_IO,
+       },
+       [1] = {
+               /* Period IRQ */
+               .start  = 45,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               /* Carry IRQ */
+               .start  = 46,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [3] = {
+               /* Alarm IRQ */
+               .start  = 44,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device rtc_device = {
+       .name           = "sh-rtc",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(rtc_resources),
+       .resource       = rtc_resources,
+};
+
 static struct resource usbf_resources[] = {
        [0] = {
                .name   = "m66592_udc",
@@ -150,6 +180,7 @@ static struct platform_device sci_device = {
 };
 
 static struct platform_device *sh7722_devices[] __initdata = {
+       &rtc_device,
        &usbf_device,
        &iic_device,
        &sci_device,
@@ -202,7 +233,6 @@ enum {
        IRDA, JPU, LCDC,
 
        /* interrupt groups */
-
        SIM, RTC, DMAC0123, VIOVOU, USB, DMAC45, FLCTL, I2C, SDHI,
 };
 
index d366a7443720875e7489721dc5765f598f6b2ffe..d998f4c795be9e82e6940d7b95dfc540df294c57 100644 (file)
@@ -50,7 +50,10 @@ EXPORT_SYMBOL(__udelay);
 EXPORT_SYMBOL(__ndelay);
 EXPORT_SYMBOL(__const_udelay);
 
-#define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL(name)
+#define DECLARE_EXPORT(name)           \
+       extern void name(void);EXPORT_SYMBOL(name)
+#define MAYBE_DECLARE_EXPORT(name)     \
+       extern void name(void) __weak;EXPORT_SYMBOL(name)
 
 /* These symbols are generated by the compiler itself */
 DECLARE_EXPORT(__udivsi3);
@@ -109,10 +112,8 @@ DECLARE_EXPORT(__movmemSI12_i4);
  * compiler which include backported patches.
  */
 DECLARE_EXPORT(__udiv_qrnnd_16);
-#if !defined(CONFIG_CPU_SH2)
-DECLARE_EXPORT(__sdivsi3_i4i);
-DECLARE_EXPORT(__udivsi3_i4i);
-#endif
+MAYBE_DECLARE_EXPORT(__sdivsi3_i4i);
+MAYBE_DECLARE_EXPORT(__udivsi3_i4i);
 #endif
 #else /* GCC 3.x */
 DECLARE_EXPORT(__movstr_i4_even);
index 4b95c4387e9e2197947af00745b8c81c509d1c7d..bbb30d882f05afc510d972a2583250f5c169dc29 100644 (file)
@@ -1107,6 +1107,15 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
 
                depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
                depth = min(ATA_MAX_QUEUE - 1, depth);
+
+               /*
+                * If this device is behind a port multiplier, we have
+                * to share the tag map between all devices on that PMP.
+                * Set up the shared tag map here and we get automatic.
+                */
+               if (dev->link->ap->pmp_link)
+                       scsi_init_shared_tag_map(sdev->host, ATA_MAX_QUEUE - 1);
+
                scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
                scsi_activate_tcq(sdev, depth);
        }
index 58630cc1eff2f1047ed0049edcbb9c4e578d511f..cda6c7cc944b1470a00ab1bafc8942236417b30a 100644 (file)
@@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data)
 
        err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
        if (err < 0) {
-               kfree(skb);
+               kfree_skb(skb);
                return err;
        }
 
index 9aaa86b232b190a1622c2ddf8ffcfc32be011cad..2eecb779437b8057cdef2c59d37bbae71930b9c1 100644 (file)
@@ -495,9 +495,10 @@ static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode)
        return cdrom_open(gd.cd_info, bdev, mode);
 }
 
-static int gdrom_bdops_release(struct block_device *bdev, fmode_t mode)
+static int gdrom_bdops_release(struct gendisk *disk, fmode_t mode)
 {
-       return cdrom_release(gd.cd_info, mode);
+       cdrom_release(gd.cd_info, mode);
+       return 0;
 }
 
 static int gdrom_bdops_mediachanged(struct gendisk *disk)
index c422e870dc52705cf779fe7742706bca3eaad86c..cd0ba51f7c801ff8288bc4f29ac1350a4ea2548c 100644 (file)
@@ -11,7 +11,7 @@
  * derived from
  *
  * Hardware driver for the AMD 768 Random Number Generator (RNG)
- * (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
+ * (c) Copyright 2001 Red Hat Inc
  *
  * derived from
  *
index fed4ef5569f5be94e778ee4103f32566ebe8c426..64d513f68368294913bf3f6dd4a3b086e53cb27e 100644 (file)
@@ -11,7 +11,7 @@
  * derived from
  *
  * Hardware driver for the AMD 768 Random Number Generator (RNG)
- * (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
+ * (c) Copyright 2001 Red Hat Inc
  *
  * derived from
  *
index 8a2fce0756ec71af923091486c094c9e1c2eb792..5dcbe603eca2eae981e70077d1cddfc7616ab0a9 100644 (file)
@@ -11,7 +11,7 @@
  * derived from
  *
  * Hardware driver for the AMD 768 Random Number Generator (RNG)
- * (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
+ * (c) Copyright 2001 Red Hat Inc
  *
  * derived from
  *
index 128202e18fc98780b2f576ed20e221dd75d3fe41..4e9573c1d39eabbd025c07a9b7a549e85080aaa8 100644 (file)
@@ -11,7 +11,7 @@
  * derived from
  *
  * Hardware driver for the AMD 768 Random Number Generator (RNG)
- * (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
+ * (c) Copyright 2001 Red Hat Inc
  *
  * derived from
  *
index 251416f2148f36c72cdd8afa0ac74a792c7db5fa..8e16bfbdcb3db8c92553a9535c4f0adfa28dada8 100644 (file)
@@ -476,6 +476,7 @@ static int ar_context_add_page(struct ar_context *ctx)
        if (ab == NULL)
                return -ENOMEM;
 
+       ab->next = NULL;
        memset(&ab->descriptor, 0, sizeof(ab->descriptor));
        ab->descriptor.control        = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
                                                    DESCRIPTOR_STATUS |
@@ -496,6 +497,21 @@ static int ar_context_add_page(struct ar_context *ctx)
        return 0;
 }
 
+static void ar_context_release(struct ar_context *ctx)
+{
+       struct ar_buffer *ab, *ab_next;
+       size_t offset;
+       dma_addr_t ab_bus;
+
+       for (ab = ctx->current_buffer; ab; ab = ab_next) {
+               ab_next = ab->next;
+               offset = offsetof(struct ar_buffer, data);
+               ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
+               dma_free_coherent(ctx->ohci->card.device, PAGE_SIZE,
+                                 ab, ab_bus);
+       }
+}
+
 #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
 #define cond_le32_to_cpu(v) \
        (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v))
@@ -2349,8 +2365,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 
        ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
        if (ohci == NULL) {
-               fw_error("Could not malloc fw_ohci data.\n");
-               return -ENOMEM;
+               err = -ENOMEM;
+               goto fail;
        }
 
        fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev);
@@ -2359,7 +2375,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 
        err = pci_enable_device(dev);
        if (err) {
-               fw_error("Failed to enable OHCI hardware.\n");
+               fw_error("Failed to enable OHCI hardware\n");
                goto fail_free;
        }
 
@@ -2427,9 +2443,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
        ohci->ir_context_list = kzalloc(size, GFP_KERNEL);
 
        if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) {
-               fw_error("Out of memory for it/ir contexts.\n");
                err = -ENOMEM;
-               goto fail_registers;
+               goto fail_contexts;
        }
 
        /* self-id dma buffer allocation */
@@ -2438,9 +2453,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
                                               &ohci->self_id_bus,
                                               GFP_KERNEL);
        if (ohci->self_id_cpu == NULL) {
-               fw_error("Out of memory for self ID buffer.\n");
                err = -ENOMEM;
-               goto fail_registers;
+               goto fail_contexts;
        }
 
        bus_options = reg_read(ohci, OHCI1394_BusOptions);
@@ -2460,9 +2474,13 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
  fail_self_id:
        dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE,
                          ohci->self_id_cpu, ohci->self_id_bus);
- fail_registers:
-       kfree(ohci->it_context_list);
+ fail_contexts:
        kfree(ohci->ir_context_list);
+       kfree(ohci->it_context_list);
+       context_release(&ohci->at_response_ctx);
+       context_release(&ohci->at_request_ctx);
+       ar_context_release(&ohci->ar_response_ctx);
+       ar_context_release(&ohci->ar_request_ctx);
        pci_iounmap(dev, ohci->registers);
  fail_iomem:
        pci_release_region(dev, 0);
@@ -2471,6 +2489,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
  fail_free:
        kfree(&ohci->card);
        ohci_pmac_off(dev);
+ fail:
+       if (err == -ENOMEM)
+               fw_error("Out of memory\n");
 
        return err;
 }
@@ -2491,8 +2512,19 @@ static void pci_remove(struct pci_dev *dev)
 
        software_reset(ohci);
        free_irq(dev->irq, ohci);
+
+       if (ohci->next_config_rom && ohci->next_config_rom != ohci->config_rom)
+               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                 ohci->next_config_rom, ohci->next_config_rom_bus);
+       if (ohci->config_rom)
+               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                 ohci->config_rom, ohci->config_rom_bus);
        dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE,
                          ohci->self_id_cpu, ohci->self_id_bus);
+       ar_context_release(&ohci->ar_request_ctx);
+       ar_context_release(&ohci->ar_response_ctx);
+       context_release(&ohci->at_request_ctx);
+       context_release(&ohci->at_response_ctx);
        kfree(ohci->it_context_list);
        kfree(ohci->ir_context_list);
        pci_iounmap(dev, ohci->registers);
index ef0b9b419c27a6cbdd4216916368641f3968df17..d334cac5e1fc64f4847ea4a72ad2620afd3167ee 100644 (file)
@@ -173,6 +173,9 @@ struct sbp2_target {
        int blocked;    /* ditto */
 };
 
+/* Impossible login_id, to detect logout attempt before successful login */
+#define INVALID_LOGIN_ID 0x10000
+
 /*
  * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
  * provided in the config rom. Most devices do provide a value, which
@@ -788,9 +791,20 @@ static void sbp2_release_target(struct kref *kref)
                        scsi_remove_device(sdev);
                        scsi_device_put(sdev);
                }
-               sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
-                               SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
-
+               if (lu->login_id != INVALID_LOGIN_ID) {
+                       int generation, node_id;
+                       /*
+                        * tgt->node_id may be obsolete here if we failed
+                        * during initial login or after a bus reset where
+                        * the topology changed.
+                        */
+                       generation = device->generation;
+                       smp_rmb(); /* node_id vs. generation */
+                       node_id    = device->node_id;
+                       sbp2_send_management_orb(lu, node_id, generation,
+                                                SBP2_LOGOUT_REQUEST,
+                                                lu->login_id, NULL);
+               }
                fw_core_remove_address_handler(&lu->address_handler);
                list_del(&lu->link);
                kfree(lu);
@@ -805,19 +819,20 @@ static void sbp2_release_target(struct kref *kref)
 
 static struct workqueue_struct *sbp2_wq;
 
+static void sbp2_target_put(struct sbp2_target *tgt)
+{
+       kref_put(&tgt->kref, sbp2_release_target);
+}
+
 /*
  * Always get the target's kref when scheduling work on one its units.
  * Each workqueue job is responsible to call sbp2_target_put() upon return.
  */
 static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay)
 {
-       if (queue_delayed_work(sbp2_wq, &lu->work, delay))
-               kref_get(&lu->tgt->kref);
-}
-
-static void sbp2_target_put(struct sbp2_target *tgt)
-{
-       kref_put(&tgt->kref, sbp2_release_target);
+       kref_get(&lu->tgt->kref);
+       if (!queue_delayed_work(sbp2_wq, &lu->work, delay))
+               sbp2_target_put(lu->tgt);
 }
 
 /*
@@ -978,6 +993,7 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)
 
        lu->tgt      = tgt;
        lu->lun      = lun_entry & 0xffff;
+       lu->login_id = INVALID_LOGIN_ID;
        lu->retries  = 0;
        lu->has_sdev = false;
        lu->blocked  = false;
@@ -1147,7 +1163,7 @@ static int sbp2_probe(struct device *dev)
 
        /* Do the login in a workqueue so we can easily reschedule retries. */
        list_for_each_entry(lu, &tgt->lu_list, link)
-               sbp2_queue_work(lu, 0);
+               sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
        return 0;
 
  fail_tgt_put:
index c1b81077c4a82b6e15bc528b314dfa87a73e1c35..5e204713002d843d34dcc19aecec530d00ea577a 100644 (file)
@@ -413,7 +413,7 @@ static void
 update_tree(struct fw_card *card, struct fw_node *root)
 {
        struct list_head list0, list1;
-       struct fw_node *node0, *node1;
+       struct fw_node *node0, *node1, *next1;
        int i, event;
 
        INIT_LIST_HEAD(&list0);
@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root)
                }
 
                node0 = fw_node(node0->link.next);
-               node1 = fw_node(node1->link.next);
+               next1 = fw_node(node1->link.next);
+               fw_node_put(node1);
+               node1 = next1;
        }
 }
 
index 027f58ce81ad124a03b630071cd94dc1d4579348..aed7dbb17cdaebb47a695a8b88a019ccf610d614 100644 (file)
@@ -248,7 +248,7 @@ struct fw_card {
        struct fw_node *local_node;
        struct fw_node *root_node;
        struct fw_node *irm_node;
-       int color;
+       u8 color; /* must be u8 to match the definition in struct fw_node */
        int gap_count;
        bool beta_repeaters_present;
 
index ce238f59b3c8d8722d39d3dac7393e5c3c721033..be3a15f5b25d85203b748a40af65defe02083e36 100644 (file)
@@ -174,5 +174,6 @@ static void __exit sgi_buttons_exit(void)
        platform_driver_unregister(&sgi_buttons_driver);
 }
 
+MODULE_LICENSE("GPL");
 module_init(sgi_buttons_init);
 module_exit(sgi_buttons_exit);
index f1fddb18d70d0bf45c1f2ed07afd53d1d66d8527..2768c69257f645750adc49af10ac8f4f5c4f2b66 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
+#include <linux/workqueue.h>
 #include <linux/mfd/da903x.h>
 
 #define DA9030_LED1_CONTROL    0x20
index 5749f22b296f90969b6580df2ae505629892762d..079e6aa874dcc13a4a8b3011c7b44d423438e4fa 100644 (file)
@@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
                lbs_deb_rx("rx err: frame received with bad length\n");
                priv->stats.rx_length_errors++;
                ret = -EINVAL;
-               kfree(skb);
+               kfree_skb(skb);
                goto done;
        }
 
index f0658d2c45b20e2aa462f3d4b3db29e27fc0773f..47816e68c9036e91c5a3fb4a8c33104819a1c84d 100644 (file)
@@ -250,8 +250,7 @@ static inline void h8300_sci_disable(struct uart_port *port)
 }
 #endif
 
-#if defined(SCI_ONLY) || defined(SCI_AND_SCIF) && \
-    defined(__H8300H__) || defined(__H8300S__)
+#if defined(__H8300H__) || defined(__H8300S__)
 static void sci_init_pins_sci(struct uart_port* port, unsigned int cflag)
 {
        int ch = (port->mapbase - SMR0) >> 3;
@@ -285,11 +284,6 @@ static void sci_init_pins_irda(struct uart_port *port, unsigned int cflag)
 #define sci_init_pins_irda NULL
 #endif
 
-#ifdef SCI_ONLY
-#define sci_init_pins_scif NULL
-#endif
-
-#if defined(SCIF_ONLY) || defined(SCI_AND_SCIF)
 #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
 static void sci_init_pins_scif(struct uart_port* port, unsigned int cflag)
 {
@@ -449,7 +443,6 @@ static inline int scif_rxroom(struct uart_port *port)
        return sci_in(port, SCFDR) & SCIF_RFDC_MASK;
 }
 #endif
-#endif /* SCIF_ONLY || SCI_AND_SCIF */
 
 static inline int sci_txroom(struct uart_port *port)
 {
@@ -485,11 +478,9 @@ static void sci_transmit_chars(struct uart_port *port)
                return;
        }
 
-#ifndef SCI_ONLY
        if (port->type == PORT_SCIF)
                count = scif_txroom(port);
        else
-#endif
                count = sci_txroom(port);
 
        do {
@@ -519,12 +510,10 @@ static void sci_transmit_chars(struct uart_port *port)
        } else {
                ctrl = sci_in(port, SCSCR);
 
-#if !defined(SCI_ONLY)
                if (port->type == PORT_SCIF) {
                        sci_in(port, SCxSR); /* Dummy read */
                        sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port));
                }
-#endif
 
                ctrl |= SCI_CTRL_FLAGS_TIE;
                sci_out(port, SCSCR, ctrl);
@@ -547,11 +536,9 @@ static inline void sci_receive_chars(struct uart_port *port)
                return;
 
        while (1) {
-#if !defined(SCI_ONLY)
                if (port->type == PORT_SCIF)
                        count = scif_rxroom(port);
                else
-#endif
                        count = sci_rxroom(port);
 
                /* Don't copy more bytes than there is room for in the buffer */
@@ -1054,10 +1041,8 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
 
        sci_out(port, SCSCR, 0x00);     /* TE=0, RE=0, CKE1=0 */
 
-#if !defined(SCI_ONLY)
        if (port->type == PORT_SCIF)
                sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST);
-#endif
 
        smr_val = sci_in(port, SCSMR) & 3;
        if ((termios->c_cflag & CSIZE) == CS7)
index 7cd28b2268001f3bea61c965f95049570f3902bf..36ce9de4b2cd436450235b0ac34819e92fc02525 100644 (file)
@@ -16,7 +16,6 @@
 # define SCPCR  0xA4000116 /* 16 bit SCI and SCIF */
 # define SCPDR  0xA4000136 /* 8  bit SCI and SCIF */
 # define SCSCR_INIT(port)          0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
-# define SCI_AND_SCIF
 #elif defined(CONFIG_CPU_SUBTYPE_SH7705)
 # define SCIF0         0xA4400000
 # define SCIF2         0xA4410000
  * SCIF0 (0xA4400000) -> Internal clock, SCK pin as serial clock output
  */
 # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \
       defined(CONFIG_CPU_SUBTYPE_SH7721)
 # define SCSCR_INIT(port)  0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */
-# define SCIF_ONLY
 #define SCIF_ORER    0x0200   /* overrun error bit */
 #elif defined(CONFIG_SH_RTS7751R2D)
 # define SCSPTR2 0xFFE80020 /* 16 bit SCIF */
 # define SCIF_ORER 0x0001   /* overrun error bit */
 # define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7750)  || \
       defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
       defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
 # define SCSCR_INIT(port) (((port)->type == PORT_SCI) ? \
        0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \
        0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ )
-# define SCI_AND_SCIF
 #elif defined(CONFIG_CPU_SUBTYPE_SH7760)
 # define SCSPTR0 0xfe600024 /* 16 bit SCIF */
 # define SCSPTR1 0xfe610024 /* 16 bit SCIF */
 # define SCSPTR2 0xfe620024 /* 16 bit SCIF */
 # define SCIF_ORER 0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)          0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
 # define SCSPTR0 0xA4400000      /* 16 bit SCIF */
 # define SCIF_ORER 0x0001   /* overrun error bit */
 # define PACR 0xa4050100
 # define PBCR 0xa4050102
 # define SCSCR_INIT(port)          0x3B
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7343)
 # define SCSPTR0 0xffe00010    /* 16 bit SCIF */
 # define SCSPTR1 0xffe10010    /* 16 bit SCIF */
 # define SCSPTR2 0xffe20010    /* 16 bit SCIF */
 # define SCSPTR3 0xffe30010    /* 16 bit SCIF */
 # define SCSCR_INIT(port) 0x32 /* TIE=0,RIE=0,TE=1,RE=1,REIE=0,CKE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7722)
 # define PADR                  0xA4050120
 # define PSDR                  0xA405013e
 # define PSCR                  0xA405011E
 # define SCIF_ORER             0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)      0x0038  /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7366)
 # define SCPDR0                        0xA405013E      /* 16 bit SCIF0 PSDR */
 # define SCSPTR0               SCPDR0
 # define SCIF_ORER             0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)      0x0038  /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
+# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7723)
 # define SCSPTR0                0xa4050160
 # define SCSPTR1                0xa405013e
 # define SCSPTR5                0xa4050128
 # define SCIF_ORER              0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)       0x0038  /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH4_202)
 # define SCSPTR2 0xffe80020 /* 16 bit SCIF */
 # define SCIF_ORER 0x0001   /* overrun error bit */
 # define SCSCR_INIT(port) 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
 # define SCIF_BASE_ADDR    0x01030000
 # define SCIF_ADDR_SH5     PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
 # define SCSPTR2           ((port->mapbase)+SCIF_PTR2_OFFS) /* 16 bit SCIF */
 # define SCLSR2            ((port->mapbase)+SCIF_LSR2_OFFS) /* 16 bit SCIF */
 # define SCSCR_INIT(port)  0x38                /* TIE=0,RIE=0, TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_H83007) || defined(CONFIG_H83068)
 # define SCSCR_INIT(port)          0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
-# define SCI_ONLY
 # define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port)
 #elif defined(CONFIG_H8S2678)
 # define SCSCR_INIT(port)          0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
-# define SCI_ONLY
 # define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port)
 #elif defined(CONFIG_CPU_SUBTYPE_SH7763)
 # define SCSPTR0 0xffe00024 /* 16 bit SCIF */
 # define SCSPTR2 0xffe10020 /* 16 bit SCIF/IRDA */
 # define SCIF_ORER 0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)      0x38    /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7770)
 # define SCSPTR0 0xff923020 /* 16 bit SCIF */
 # define SCSPTR1 0xff924020 /* 16 bit SCIF */
 # define SCSPTR2 0xff925020 /* 16 bit SCIF */
 # define SCIF_ORER 0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)      0x3c /* TIE=0,RIE=0,TE=1,RE=1,REIE=1,cke=2 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7780)
 # define SCSPTR0       0xffe00024      /* 16 bit SCIF */
 # define SCSPTR1       0xffe10024      /* 16 bit SCIF */
 # define SCIF_ORER     0x0001          /* Overrun error bit */
 # define SCSCR_INIT(port)      0x3a    /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7785)
 # define SCSPTR0       0xffea0024      /* 16 bit SCIF */
 # define SCSPTR1       0xffeb0024      /* 16 bit SCIF */
 # define SCSPTR5       0xffef0024      /* 16 bit SCIF */
 # define SCIF_OPER     0x0001          /* Overrun error bit */
 # define SCSCR_INIT(port)      0x3a    /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7203) || \
       defined(CONFIG_CPU_SUBTYPE_SH7206) || \
       defined(CONFIG_CPU_SUBTYPE_SH7263)
 # define SCSPTR2 0xfffe9020 /* 16 bit SCIF */
 # define SCSPTR3 0xfffe9820 /* 16 bit SCIF */
 # define SCSCR_INIT(port)      0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SH7619)
 # define SCSPTR0 0xf8400020 /* 16 bit SCIF */
 # define SCSPTR1 0xf8410020 /* 16 bit SCIF */
 # define SCSPTR2 0xf8420020 /* 16 bit SCIF */
 # define SCIF_ORER 0x0001  /* overrun error bit */
 # define SCSCR_INIT(port)      0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #elif defined(CONFIG_CPU_SUBTYPE_SHX3)
 # define SCSPTR0 0xffc30020            /* 16 bit SCIF */
 # define SCSPTR1 0xffc40020            /* 16 bit SCIF */
 # define SCSPTR3 0xffc60020            /* 16 bit SCIF */
 # define SCIF_ORER 0x0001              /* Overrun error bit */
 # define SCSCR_INIT(port)      0x38    /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-# define SCIF_ONLY
 #else
 # error CPU subtype not defined
 #endif
 # define SCIF_TXROOM_MAX 16
 #endif
 
-#if defined(SCI_ONLY)
-# define SCxSR_TEND(port)              SCI_TEND
-# define SCxSR_ERRORS(port)            SCI_ERRORS
-# define SCxSR_RDxF(port)               SCI_RDRF
-# define SCxSR_TDxE(port)               SCI_TDRE
-# define SCxSR_ORER(port)              SCI_ORER
-# define SCxSR_FER(port)               SCI_FER
-# define SCxSR_PER(port)               SCI_PER
-# define SCxSR_BRK(port)               0x00
-# define SCxSR_RDxF_CLEAR(port)                0xbc
-# define SCxSR_ERROR_CLEAR(port)       0xc4
-# define SCxSR_TDxE_CLEAR(port)                0x78
-# define SCxSR_BREAK_CLEAR(port)       0xc4
-#elif defined(SCIF_ONLY)
-# define SCxSR_TEND(port)              SCIF_TEND
-# define SCxSR_ERRORS(port)            SCIF_ERRORS
-# define SCxSR_RDxF(port)               SCIF_RDF
-# define SCxSR_TDxE(port)               SCIF_TDFE
+#define SCxSR_TEND(port)       (((port)->type == PORT_SCI) ? SCI_TEND   : SCIF_TEND)
+#define SCxSR_ERRORS(port)     (((port)->type == PORT_SCI) ? SCI_ERRORS : SCIF_ERRORS)
+#define SCxSR_RDxF(port)       (((port)->type == PORT_SCI) ? SCI_RDRF   : SCIF_RDF)
+#define SCxSR_TDxE(port)       (((port)->type == PORT_SCI) ? SCI_TDRE   : SCIF_TDFE)
+#define SCxSR_FER(port)                (((port)->type == PORT_SCI) ? SCI_FER    : SCIF_FER)
+#define SCxSR_PER(port)                (((port)->type == PORT_SCI) ? SCI_PER    : SCIF_PER)
+#define SCxSR_BRK(port)                (((port)->type == PORT_SCI) ? 0x00       : SCIF_BRK)
+
 #if defined(CONFIG_CPU_SUBTYPE_SH7705)
-# define SCxSR_ORER(port)              SCIF_ORER
+# define SCxSR_ORER(port)      (((port)->type == PORT_SCI) ? SCI_ORER : SCIF_ORER)
 #else
-# define SCxSR_ORER(port)              0x0000
+# define SCxSR_ORER(port)      (((port)->type == PORT_SCI) ? SCI_ORER : 0x0000)
 #endif
-# define SCxSR_FER(port)               SCIF_FER
-# define SCxSR_PER(port)               SCIF_PER
-# define SCxSR_BRK(port)               SCIF_BRK
+
 #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
     defined(CONFIG_CPU_SUBTYPE_SH7720) || \
     defined(CONFIG_CPU_SUBTYPE_SH7721)
-# define SCxSR_RDxF_CLEAR(port)         (sci_in(port,SCxSR)&0xfffc)
-# define SCxSR_ERROR_CLEAR(port)        (sci_in(port,SCxSR)&0xfd73)
-# define SCxSR_TDxE_CLEAR(port)         (sci_in(port,SCxSR)&0xffdf)
-# define SCxSR_BREAK_CLEAR(port)        (sci_in(port,SCxSR)&0xffe3)
-#else
-/* SH7705 can also use this, clearing is same between 7705 and 7709 */
-# define SCxSR_RDxF_CLEAR(port)                0x00fc
-# define SCxSR_ERROR_CLEAR(port)       0x0073
-# define SCxSR_TDxE_CLEAR(port)                0x00df
-# define SCxSR_BREAK_CLEAR(port)       0x00e3
-#endif
+# define SCxSR_RDxF_CLEAR(port)         (sci_in(port, SCxSR) & 0xfffc)
+# define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73)
+# define SCxSR_TDxE_CLEAR(port)         (sci_in(port, SCxSR) & 0xffdf)
+# define SCxSR_BREAK_CLEAR(port) (sci_in(port, SCxSR) & 0xffe3)
 #else
-# define SCxSR_TEND(port)       (((port)->type == PORT_SCI) ? SCI_TEND   : SCIF_TEND)
-# define SCxSR_ERRORS(port)     (((port)->type == PORT_SCI) ? SCI_ERRORS : SCIF_ERRORS)
-# define SCxSR_RDxF(port)        (((port)->type == PORT_SCI) ? SCI_RDRF   : SCIF_RDF)
-# define SCxSR_TDxE(port)        (((port)->type == PORT_SCI) ? SCI_TDRE   : SCIF_TDFE)
-# define SCxSR_ORER(port)        (((port)->type == PORT_SCI) ? SCI_ORER   : 0x0000)
-# define SCxSR_FER(port)         (((port)->type == PORT_SCI) ? SCI_FER    : SCIF_FER)
-# define SCxSR_PER(port)         (((port)->type == PORT_SCI) ? SCI_PER    : SCIF_PER)
-# define SCxSR_BRK(port)         (((port)->type == PORT_SCI) ? 0x00       : SCIF_BRK)
 # define SCxSR_RDxF_CLEAR(port)         (((port)->type == PORT_SCI) ? 0xbc : 0x00fc)
 # define SCxSR_ERROR_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x0073)
 # define SCxSR_TDxE_CLEAR(port)  (((port)->type == PORT_SCI) ? 0x78 : 0x00df)
@@ -578,14 +531,10 @@ static inline int sci_rxd_in(struct uart_port *port)
       defined(CONFIG_CPU_SUBTYPE_SH4_202)
 static inline int sci_rxd_in(struct uart_port *port)
 {
-#ifndef SCIF_ONLY
        if (port->mapbase == 0xffe00000)
                return ctrl_inb(SCSPTR1)&0x01 ? 1 : 0; /* SCI */
-#endif
-#ifndef SCI_ONLY
        if (port->mapbase == 0xffe80000)
                return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
-#endif
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7760)
index cfd29da714d1e9bf9b9f41338c09723ff09422de..0376ac66c44a6127199c5389f33f138f73c53fba 100644 (file)
@@ -2,7 +2,7 @@
  *             An implementation of a loadable kernel mode driver providing
  *             multiple kernel/user space bidirectional communications links.
  *
- *             Author:         Alan Cox <alan@redhat.com>
+ *             Author:         Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
index b9195c02a8637c6bf14bc852ae8e8a924605a383..dc52793ff8f8a06ddf1d89d62d7bb44fb9eee740 100644 (file)
@@ -5,7 +5,7 @@
  *
  *  nfs inode and superblock handling functions
  *
- *  Modularised by Alan Cox <Alan.Cox@linux.org>, while hacking some
+ *  Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some
  *  experimental NFS changes. Modularisation taken straight from SYS5 fs.
  *
  *  Change to nfs_read_super() to permit NFS mounts to multi-homed hosts.
index a3b0061dfd4566ea44f253b5ec952fd0f866674c..f48db679a1c681aecdfef6ed2eb662fec9d7d2bc 100644 (file)
@@ -5,7 +5,7 @@
  *
  *  nfs superblock handling functions
  *
- *  Modularised by Alan Cox <Alan.Cox@linux.org>, while hacking some
+ *  Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some
  *  experimental NFS changes. Modularisation taken straight from SYS5 fs.
  *
  *  Change to nfs_read_super() to permit NFS mounts to multi-homed hosts.
index bb9f4b05703de9b587a1b2cbd36ab651d2613da8..6af7fba7abb1832d66c5ae15b5dafa12a0f819c6 100644 (file)
@@ -40,7 +40,7 @@
  *
  *
  * Alan Cox         :  security fixes.
- *                     <Alan.Cox@linux.org>
+ *                     <alan@lxorguk.ukuu.org.uk>
  *
  * Al Viro           :  safe handling of mm_struct
  *
index c9609f9aedac6666ec0525f6c4b8d2fbd74a6fbb..4157faa857b697b3c9a4a5e55520ef7dd6c48339 100644 (file)
@@ -72,6 +72,7 @@ struct phonetmsg {
        } pn_msg_u;
 };
 #define PN_COMMON_MESSAGE      0xF0
+#define PN_COMMGR              0x10
 #define PN_PREFIX              0xE0 /* resource for extended messages */
 #define pn_submsg_id           pn_msg_u.base.pn_submsg_id
 #define pn_e_submsg_id         pn_msg_u.ext.pn_e_submsg_id
index d4e72508e145a8f743f6e02ec4d3a7ea81cdd7a2..c6a24518446039844f384e31265df66b3c01791f 100644 (file)
@@ -27,7 +27,7 @@
  * The lower layers may not require more space, ever. Make sure it's
  * enough.
  */
-#define MAX_PHONET_HEADER      8
+#define MAX_PHONET_HEADER      (8 + MAX_HEADER)
 
 /*
  * Every Phonet* socket has this structure first in its
index cf4c219c0b5cb9ab758046737b2ca814164b01a0..17231385cb3721932bf02910854db0396d973b92 100644 (file)
@@ -140,8 +140,18 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag)
  */
 static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth)
 {
-       shost->bqt = blk_init_tags(depth);
-       return shost->bqt ? 0 : -ENOMEM;
+       /*
+        * If the shared tag map isn't already initialized, do it now.
+        * This saves callers from having to check ->bqt when setting up
+        * devices on the shared host (for libata)
+        */
+       if (!shost->bqt) {
+               shost->bqt = blk_init_tags(depth);
+               if (!shost->bqt)
+                       return -ENOMEM;
+       }
+
+       return 0;
 }
 
 /**
index e4c5ac9fe89bf6c693690f22e5e0e4160443acd4..ba85d8831893183b6f72053f5b4952a54cdf0ba5 100644 (file)
@@ -2279,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
        }
 
        memset(&opts, 0, sizeof(opts));
+#ifdef CONFIG_SYN_COOKIES
+       if (unlikely(req->cookie_ts))
+               TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
+       else
+#endif
        TCP_SKB_CB(skb)->when = tcp_time_stamp;
        tcp_header_size = tcp_synack_options(sk, req, mss,
                                             skb, &opts, &md5) +
@@ -2304,11 +2309,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
 
        /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
        th->window = htons(min(req->rcv_wnd, 65535U));
-#ifdef CONFIG_SYN_COOKIES
-       if (unlikely(req->cookie_ts))
-               TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
-       else
-#endif
        tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
        th->doff = (tcp_header_size >> 2);
        TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
index b9d97effebe32ac3c276bf4dee94cda5da4fb7cf..defeb7a0d502ab92dcc7253f0f97e10ae341209e 100644 (file)
@@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb)
                return 0; /* we are not the destination */
        if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5))
                return 0;
+       if (ph->pn_res == PN_COMMGR) /* indications */
+               return 0;
 
        ph = pn_hdr(skb); /* re-acquires the pointer */
        pm = pn_msg(skb);
@@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb)
 
        return pn_raw_send(data, sizeof(data), rskb->dev,
                                pn_object(oph->pn_sdev, 0x00),
-                               pn_object(oph->pn_rdev, oph->pn_robj), 0x10);
+                               pn_object(oph->pn_rdev, oph->pn_robj),
+                               PN_COMMGR);
 }
 
 
index eb9bc365530dde4107f1cf4f9de102bd66dac59b..c180598f1710498bf94ca0549622c798288fb675 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Initialisation code for Cyrix/NatSemi VSA1 softaudio
  *
- *     (C) Copyright 2003 Red Hat Inc <alan@redhat.com>
+ *     (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
  *
  * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems.
  * The older version (VSA1) provides fairly good soundblaster emulation
index 92f3a976ef2e719a8d81154d8501dc492deec1dd..a7f38e63303f82120ceffacb4f08daf4b75f889d 100644 (file)
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card,
                goto free_and_ret;
 
        chip->bar = pci_resource_start(pci, 0);
-       chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0));
+       chip->iobase = pci_ioremap_bar(pci, 0);
        if (chip->iobase == NULL) {
                printk(KERN_ERR PFX "unable to reserve region.\n");
                err = -EBUSY;
index 085a52b8c80764a0ebcfe42c4d5bcb3e130f446d..226fe8237d31997c445f0337b4effca37f57bf37 100644 (file)
@@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
                return err;
        }
        chip->addr = pci_resource_start(pci, 0);
-       chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
+       chip->remap_addr = pci_ioremap_bar(pci, 0);
        if (chip->remap_addr == NULL) {
                snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
                snd_atiixp_free(chip);
index 2f106306c7fe6305a3d1f5c5a22f2cf54837b1ff..0e6e5cc1c501e36f531baf07c23d31089f4d931a 100644 (file)
@@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
                return err;
        }
        chip->addr = pci_resource_start(pci, 0);
-       chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
+       chip->remap_addr = pci_ioremap_bar(pci, 0);
        if (chip->remap_addr == NULL) {
                snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
                snd_atiixp_free(chip);
index 68368e490074c21b6a0bd312d8c2a3b2e089f65d..a36d4d1fd419f098e3dabdfa598914d49d92b378 100644 (file)
@@ -180,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0)
                goto regions_out;
 
-       chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
-                                    pci_resource_len(pci, 0));
+       chip->mmio = pci_ioremap_bar(pci, 0);
        if (!chip->mmio) {
                printk(KERN_ERR "MMIO area remap failed.\n");
                err = -ENOMEM;
index 3aa8d973540abefb0c55234ec4c84eafe66ece26..1aa1c04025407f2243d11a277f26b2a29da6c740 100644 (file)
@@ -749,8 +749,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
                pci_disable_device(pci);
                return err;
        }
-       chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
-                                    pci_resource_len(pci, 0));
+       chip->mmio = pci_ioremap_bar(pci, 0);
        if (!chip->mmio) {
                snd_printk(KERN_ERR "cannot remap io memory\n");
                err = -ENOMEM;
index ef9308f7c45b3e17deb00c3fcf22f9fa96795293..192e7842e181e4cbbe8c3f0be43c7cccb4213964 100644 (file)
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
        chip->ba0_addr = pci_resource_start(pci, 0);
        chip->ba1_addr = pci_resource_start(pci, 1);
 
-       chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0));
-       chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1));
+       chip->ba0 = pci_ioremap_bar(pci, 0);
+       chip->ba1 = pci_ioremap_bar(pci, 1);
        if (!chip->ba0 || !chip->ba1) {
                snd_cs4281_free(chip);
                return -ENOMEM;
index 7ff8b68e997e89cbb83bda6ced49f49cf44ceea9..6dea5b5cc77419814334addf8b22c06c5bee142c 100644 (file)
@@ -2,7 +2,7 @@
  * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio
  *
  *     (C) Copyright 2007 Ash Willis <ashwillis@programmer.net>
- *     (C) Copyright 2003 Red Hat Inc <alan@redhat.com>
+ *     (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
  *
  * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did
  * mess with it a bit. The chip seems to have to have trouble with full duplex
@@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card,
        }
        chip->pci_base = pci_resource_start(pci, 0);
 
-       mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0));
+       mem = pci_ioremap_bar(pci, 0);
        if (mem == NULL) {
                kfree(chip);
                pci_disable_device(pci);
index 9f316c1b2790851d6b6f83bcdd9a1e980ea2315b..f080f8ce0ecb6a6bb56d3f2515ebaa0960b90d39 100644 (file)
@@ -2158,7 +2158,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
        }
 
        chip->addr = pci_resource_start(pci, 0);
-       chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0));
+       chip->remap_addr = pci_ioremap_bar(pci, 0);
        if (chip->remap_addr == NULL) {
                snd_printk(KERN_ERR SFX "ioremap error\n");
                err = -ENXIO;
index ef4955c73c88cf8000788ff769b70c1e36dc9767..4eceab9bd10985427d041a48c9401fae9cc271a4 100644 (file)
@@ -307,6 +307,13 @@ struct alc_spec {
        /* for PLL fix */
        hda_nid_t pll_nid;
        unsigned int pll_coef_idx, pll_coef_bit;
+
+#ifdef SND_HDA_NEEDS_RESUME
+#define ALC_MAX_PINS   16
+       unsigned int num_pins;
+       hda_nid_t pin_nids[ALC_MAX_PINS];
+       unsigned int pin_cfgs[ALC_MAX_PINS];
+#endif
 };
 
 /*
@@ -2778,6 +2785,64 @@ static void alc_free(struct hda_codec *codec)
        codec->spec = NULL; /* to be sure */
 }
 
+#ifdef SND_HDA_NEEDS_RESUME
+static void store_pin_configs(struct hda_codec *codec)
+{
+       struct alc_spec *spec = codec->spec;
+       hda_nid_t nid, end_nid;
+
+       end_nid = codec->start_nid + codec->num_nodes;
+       for (nid = codec->start_nid; nid < end_nid; nid++) {
+               unsigned int wid_caps = get_wcaps(codec, nid);
+               unsigned int wid_type =
+                       (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
+               if (wid_type != AC_WID_PIN)
+                       continue;
+               if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids))
+                       break;
+               spec->pin_nids[spec->num_pins] = nid;
+               spec->pin_cfgs[spec->num_pins] =
+                       snd_hda_codec_read(codec, nid, 0,
+                                          AC_VERB_GET_CONFIG_DEFAULT, 0);
+               spec->num_pins++;
+       }
+}
+
+static void resume_pin_configs(struct hda_codec *codec)
+{
+       struct alc_spec *spec = codec->spec;
+       int i;
+
+       for (i = 0; i < spec->num_pins; i++) {
+               hda_nid_t pin_nid = spec->pin_nids[i];
+               unsigned int pin_config = spec->pin_cfgs[i];
+               snd_hda_codec_write(codec, pin_nid, 0,
+                                   AC_VERB_SET_CONFIG_DEFAULT_BYTES_0,
+                                   pin_config & 0x000000ff);
+               snd_hda_codec_write(codec, pin_nid, 0,
+                                   AC_VERB_SET_CONFIG_DEFAULT_BYTES_1,
+                                   (pin_config & 0x0000ff00) >> 8);
+               snd_hda_codec_write(codec, pin_nid, 0,
+                                   AC_VERB_SET_CONFIG_DEFAULT_BYTES_2,
+                                   (pin_config & 0x00ff0000) >> 16);
+               snd_hda_codec_write(codec, pin_nid, 0,
+                                   AC_VERB_SET_CONFIG_DEFAULT_BYTES_3,
+                                   pin_config >> 24);
+       }
+}
+
+static int alc_resume(struct hda_codec *codec)
+{
+       resume_pin_configs(codec);
+       codec->patch_ops.init(codec);
+       snd_hda_codec_resume_amp(codec);
+       snd_hda_codec_resume_cache(codec);
+       return 0;
+}
+#else
+#define store_pin_configs(codec)
+#endif
+
 /*
  */
 static struct hda_codec_ops alc_patch_ops = {
@@ -2786,6 +2851,9 @@ static struct hda_codec_ops alc_patch_ops = {
        .init = alc_init,
        .free = alc_free,
        .unsol_event = alc_unsol_event,
+#ifdef SND_HDA_NEEDS_RESUME
+       .resume = alc_resume,
+#endif
 #ifdef CONFIG_SND_HDA_POWER_SAVE
        .check_power_status = alc_check_power_status,
 #endif
@@ -3832,6 +3900,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
        spec->num_mux_defs = 1;
        spec->input_mux = &spec->private_imux;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -5250,6 +5319,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
        }
        spec->num_mixers++;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -10313,6 +10383,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
        if (err < 0)
                return err;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -11447,6 +11518,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
        if (err < 0)
                return err;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -12230,6 +12302,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
        spec->mixers[spec->num_mixers] = alc269_capture_mixer;
        spec->num_mixers++;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -13316,6 +13389,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
        spec->mixers[spec->num_mixers] = alc861_capture_mixer;
        spec->num_mixers++;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -14427,6 +14501,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
        if (err < 0)
                return err;
 
+       store_pin_configs(codec);
        return 1;
 }
 
@@ -16258,6 +16333,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
 
        spec->mixers[spec->num_mixers] = alc662_capture_mixer;
        spec->num_mixers++;
+
+       store_pin_configs(codec);
        return 1;
 }
 
index 2d0dce649a644fe4a5adc479ae76e53a541b3025..ae7601f353a706d0f69ca0a31195104b3040beb8 100644 (file)
@@ -1314,8 +1314,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
        }
        for (i = 0; i < 2; i++) {
                mgr->mem[i].phys = pci_resource_start(pci, i);
-               mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys,
-                                                  pci_resource_len(pci, i));
+               mgr->mem[i].virt = pci_ioremap_bar(pci, i);
                if (!mgr->mem[i].virt) {
                        printk(KERN_ERR "unable to remap resource 0x%lx\n",
                               mgr->mem[i].phys);
index 827587f08180de31774c0fdc79817189d2bf605b..e020c160ee441e815b6b6c59159cd30c77ed38ec 100644 (file)
@@ -70,12 +70,24 @@ static struct sport_param sport_params[2] = {
        }
 };
 
-static u16 sport_req[][7] = {
-               { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
-                 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0},
-               { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
-                 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0},
-};
+/*
+ * Setting the TFS pin selector for SPORT 0 based on whether the selected
+ * port id F or G. If the port is F then no conflict should exist for the
+ * TFS. When Port G is selected and EMAC then there is a conflict between
+ * the PHY interrupt line and TFS.  Current settings prevent the conflict
+ * by ignoring the TFS pin when Port G is selected. This allows both
+ * ssm2602 using Port G and EMAC concurrently.
+ */
+#ifdef CONFIG_BF527_SPORT0_PORTF
+#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
+#else
+#define LOCAL_SPORT0_TFS (0)
+#endif
+
+static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
+               P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0},
+               {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI,
+               P_SPORT1_RSCLK, P_SPORT1_TFS, 0} };
 
 static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
                unsigned int fmt)
@@ -98,23 +110,21 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
                ret = -EINVAL;
                break;
        default:
+               printk(KERN_ERR "%s: Unknown DAI format type\n", __func__);
                ret = -EINVAL;
                break;
        }
 
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
-       case SND_SOC_DAIFMT_CBS_CFS:
-               ret = -EINVAL;
-               break;
-       case SND_SOC_DAIFMT_CBM_CFS:
-               ret = -EINVAL;
-               break;
        case SND_SOC_DAIFMT_CBM_CFM:
                break;
+       case SND_SOC_DAIFMT_CBS_CFS:
+       case SND_SOC_DAIFMT_CBM_CFS:
        case SND_SOC_DAIFMT_CBS_CFM:
                ret = -EINVAL;
                break;
        default:
+               printk(KERN_ERR "%s: Unknown DAI master type\n", __func__);
                ret = -EINVAL;
                break;
        }
index faef87a9bc3fdbac4f5ed27040877de887db6783..a75b289a5d78465c25ccf2aab83958e3e8a0a67d 100644 (file)
@@ -57,7 +57,7 @@ module_exit(cleanup_soundcore);
 /*
  *     OSS sound core handling. Breaks out sound functions to submodules
  *     
- *     Author:         Alan Cox <alan.cox@linux.org>
+ *     Author:         Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *     Fixes:
  *