From e15ea2b656f2fba1b3e38770a8cfdd283bcf052b Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Fri, 27 Jul 2007 15:58:58 +0000 Subject: [adm5120] rename patches to follow our naming conventions git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8196 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.22/004-adm5120_nand.patch | 29 ++ .../patches-2.6.22/004-adm5120_uart.patch | 53 ---- .../patches-2.6.22/008-adm5120_uart.patch | 53 ++++ .../100-mtd-myloder-partition-parser.patch | 39 --- .../100-mtd_myloder_partition_parser.patch | 39 +++ .../101-cfi-fixup-macronix-bootloc.patch | 95 ------- .../101-cfi_fixup_macronix_bootloc.patch | 95 +++++++ .../102-jedec-pmc-39lvxxx-chips.patch | 74 ----- .../102-jedec_pmc_39lvxxx_chips.patch | 74 +++++ .../patches-2.6.22/200-amba-pl010-hacks.patch | 297 --------------------- .../patches-2.6.22/200-amba_pl010_hacks.patch | 297 +++++++++++++++++++++ .../patches-2.6.22/201-amba-bus-hacks.patch | 15 -- .../patches-2.6.22/201-amba_bus_hacks.patch | 15 ++ .../adm5120-2.6/patches-2.6.22/500-Nand.patch | 29 -- 14 files changed, 602 insertions(+), 602 deletions(-) create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_nand.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_uart.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/100-mtd_myloder_partition_parser.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/101-cfi_fixup_macronix_bootloc.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/102-jedec-pmc-39lvxxx-chips.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/102-jedec_pmc_39lvxxx_chips.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/200-amba-pl010-hacks.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/200-amba_pl010_hacks.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/201-amba-bus-hacks.patch create mode 100644 target/linux/adm5120-2.6/patches-2.6.22/201-amba_bus_hacks.patch delete mode 100644 target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch (limited to 'target/linux/adm5120-2.6/patches-2.6.22') diff --git a/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_nand.patch b/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_nand.patch new file mode 100644 index 0000000000..79915e0281 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_nand.patch @@ -0,0 +1,29 @@ +Index: linux-2.6.22.1/drivers/mtd/nand/Kconfig +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/nand/Kconfig ++++ linux-2.6.22.1/drivers/mtd/nand/Kconfig +@@ -81,6 +81,12 @@ config MTD_NAND_TS7250 + help + Support for NAND flash on Technologic Systems TS-7250 platform. + ++config MTD_NAND_RB100 ++ tristate "NAND Flash device on RB100 board" ++ depends on MTD_NAND ++ help ++ Support for NAND flash on RB100 platform. ++ + config MTD_NAND_IDS + tristate + +Index: linux-2.6.22.1/drivers/mtd/nand/Makefile +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/nand/Makefile ++++ linux-2.6.22.1/drivers/mtd/nand/Makefile +@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan + obj-$(CONFIG_MTD_NAND_SPIA) += spia.o + obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o + obj-$(CONFIG_MTD_NAND_TOTO) += toto.o ++obj-$(CONFIG_MTD_NAND_RB100) += rbmipsnand.o + obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o + obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o + obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch b/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch deleted file mode 100644 index 7f8451324d..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/004-adm5120_uart.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: linux-2.6.22.1/drivers/serial/Makefile -=================================================================== ---- linux-2.6.22.1.orig/drivers/serial/Makefile -+++ linux-2.6.22.1/drivers/serial/Makefile -@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) - obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o - obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o - obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o -+obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o - obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o - obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o - obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o -Index: linux-2.6.22.1/include/linux/serial_core.h -=================================================================== ---- linux-2.6.22.1.orig/include/linux/serial_core.h -+++ linux-2.6.22.1/include/linux/serial_core.h -@@ -143,6 +143,9 @@ - #define PORT_KS8695 76 - - -+/* ADMtek ADM5120 SoC */ -+#define PORT_ADM5120 77 -+ - #ifdef __KERNEL__ - - #include -Index: linux-2.6.22.1/drivers/serial/Kconfig -=================================================================== ---- linux-2.6.22.1.orig/drivers/serial/Kconfig -+++ linux-2.6.22.1/drivers/serial/Kconfig -@@ -270,6 +270,22 @@ config SERIAL_8250_RM9K - - comment "Non-8250 serial port support" - -+config SERIAL_ADM5120 -+ bool "ADM5120 serial port support" -+ depends on MIPS_ADM5120 -+ select SERIAL_CORE -+ select SERIAL_CORE_CONSOLE -+ help -+ Driver for the on chip UARTs on the ADM5120 SoC -+ -+config ADM5120_NR_UARTS -+ int "Maximum number of ADM5120 serial ports" -+ depends on SERIAL_ADM5120 -+ default "2" -+ ---help--- -+ Set this to the number of serial ports you want the driver to -+ support. -+ - config SERIAL_AMBA_PL010 - tristate "ARM AMBA PL010 serial port support" - depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) diff --git a/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_uart.patch b/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_uart.patch new file mode 100644 index 0000000000..7f8451324d --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/008-adm5120_uart.patch @@ -0,0 +1,53 @@ +Index: linux-2.6.22.1/drivers/serial/Makefile +=================================================================== +--- linux-2.6.22.1.orig/drivers/serial/Makefile ++++ linux-2.6.22.1/drivers/serial/Makefile +@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) + obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o + obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o + obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o ++obj-$(CONFIG_SERIAL_ADM5120) += adm5120_uart.o + obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o + obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o + obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o +Index: linux-2.6.22.1/include/linux/serial_core.h +=================================================================== +--- linux-2.6.22.1.orig/include/linux/serial_core.h ++++ linux-2.6.22.1/include/linux/serial_core.h +@@ -143,6 +143,9 @@ + #define PORT_KS8695 76 + + ++/* ADMtek ADM5120 SoC */ ++#define PORT_ADM5120 77 ++ + #ifdef __KERNEL__ + + #include +Index: linux-2.6.22.1/drivers/serial/Kconfig +=================================================================== +--- linux-2.6.22.1.orig/drivers/serial/Kconfig ++++ linux-2.6.22.1/drivers/serial/Kconfig +@@ -270,6 +270,22 @@ config SERIAL_8250_RM9K + + comment "Non-8250 serial port support" + ++config SERIAL_ADM5120 ++ bool "ADM5120 serial port support" ++ depends on MIPS_ADM5120 ++ select SERIAL_CORE ++ select SERIAL_CORE_CONSOLE ++ help ++ Driver for the on chip UARTs on the ADM5120 SoC ++ ++config ADM5120_NR_UARTS ++ int "Maximum number of ADM5120 serial ports" ++ depends on SERIAL_ADM5120 ++ default "2" ++ ---help--- ++ Set this to the number of serial ports you want the driver to ++ support. ++ + config SERIAL_AMBA_PL010 + tristate "ARM AMBA PL010 serial port support" + depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) diff --git a/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch b/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch deleted file mode 100644 index 574b2d2158..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/100-mtd-myloder-partition-parser.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: linux-2.6.22.1/drivers/mtd/Kconfig -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/Kconfig -+++ linux-2.6.22.1/drivers/mtd/Kconfig -@@ -160,6 +160,22 @@ config MTD_AFS_PARTS - for your particular device. It won't happen automatically. The - 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example. - -+config MTD_MYLOADER_PARTS -+ tristate "MyLoader partition parsing" -+ depends on MIPS_ADM5120 && MTD_PARTITIONS -+ ---help--- -+ MyLoader is a bootloader which allows the user to define partitions -+ in flash devices, by putting a table in the second erase block -+ on the device, similar to a partition table. This table gives the -+ offsets and lengths of the user defined partitions. -+ -+ If you need code which can detect and parse these tables, and -+ register MTD 'partitions' corresponding to each image detected, -+ enable this option. -+ -+ You will still need the parsing functions to be called by the driver -+ for your particular device. It won't happen automatically. -+ - comment "User Modules And Translation Layers" - - config MTD_CHAR -Index: linux-2.6.22.1/drivers/mtd/Makefile -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/Makefile -+++ linux-2.6.22.1/drivers/mtd/Makefile -@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o - obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o - obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o - obj-$(CONFIG_MTD_AFS_PARTS) += afs.o -+obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o - - # 'Users' - code which presents functionality to userspace. - obj-$(CONFIG_MTD_CHAR) += mtdchar.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/100-mtd_myloder_partition_parser.patch b/target/linux/adm5120-2.6/patches-2.6.22/100-mtd_myloder_partition_parser.patch new file mode 100644 index 0000000000..574b2d2158 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/100-mtd_myloder_partition_parser.patch @@ -0,0 +1,39 @@ +Index: linux-2.6.22.1/drivers/mtd/Kconfig +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/Kconfig ++++ linux-2.6.22.1/drivers/mtd/Kconfig +@@ -160,6 +160,22 @@ config MTD_AFS_PARTS + for your particular device. It won't happen automatically. The + 'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example. + ++config MTD_MYLOADER_PARTS ++ tristate "MyLoader partition parsing" ++ depends on MIPS_ADM5120 && MTD_PARTITIONS ++ ---help--- ++ MyLoader is a bootloader which allows the user to define partitions ++ in flash devices, by putting a table in the second erase block ++ on the device, similar to a partition table. This table gives the ++ offsets and lengths of the user defined partitions. ++ ++ If you need code which can detect and parse these tables, and ++ register MTD 'partitions' corresponding to each image detected, ++ enable this option. ++ ++ You will still need the parsing functions to be called by the driver ++ for your particular device. It won't happen automatically. ++ + comment "User Modules And Translation Layers" + + config MTD_CHAR +Index: linux-2.6.22.1/drivers/mtd/Makefile +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/Makefile ++++ linux-2.6.22.1/drivers/mtd/Makefile +@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o + obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o + obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o + obj-$(CONFIG_MTD_AFS_PARTS) += afs.o ++obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o + + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_CHAR) += mtdchar.o diff --git a/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch b/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch deleted file mode 100644 index 84c45d2014..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/101-cfi-fixup-macronix-bootloc.patch +++ /dev/null @@ -1,95 +0,0 @@ -Index: linux-2.6.22.1/drivers/mtd/chips/cfi_cmdset_0002.c -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/chips/cfi_cmdset_0002.c -+++ linux-2.6.22.1/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -47,12 +47,19 @@ - #define MANUFACTURER_AMD 0x0001 - #define MANUFACTURER_ATMEL 0x001F - #define MANUFACTURER_SST 0x00BF -+#define MANUFACTURER_MACRONIX 0x00C2 - #define SST49LF004B 0x0060 - #define SST49LF040B 0x0050 - #define SST49LF008A 0x005a - #define AT49BV6416 0x00d6 - #define MANUFACTURER_SAMSUNG 0x00ec - -+/* Macronix */ -+#define MX29LV160B 0x2249 /* MX29LV160 Bottom-boot chip */ -+#define MX29LV160T 0x22C4 /* MX29LV160 Top-boot chip */ -+#define MX29LV320B 0x22A8 /* MX29LV320 Bottom-boot chip */ -+#define MX29LV320T 0x22A7 /* MX29LV320 Top-boot chip */ -+ - static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); - static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); - static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); -@@ -217,6 +224,41 @@ static void fixup_use_atmel_lock(struct - mtd->flags |= MTD_STUPID_LOCK; - } - -+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+/* -+ * Some Macronix chips has no/bad bootblock information in the CFI table -+ */ -+static void fixup_macronix_bootloc(struct mtd_info *mtd, void* param) -+{ -+ struct map_info *map = mtd->priv; -+ struct cfi_private *cfi = map->fldrv_priv; -+ struct cfi_pri_amdstd *extp = cfi->cmdset_priv; -+ __u8 t; -+ -+ switch (cfi->id) { -+ /* TODO: put affected chip ids here */ -+ case MX29LV160B: -+ case MX29LV320B: -+ t = 2; /* Bottom boot */ -+ break; -+ case MX29LV160T: -+ case MX29LV320T: -+ t = 3; /* Top boot */ -+ break; -+ default: -+ return; -+ } -+ -+ if (extp->TopBottom == t) -+ /* boot location detected by the CFI layer is correct */ -+ return; -+ -+ extp->TopBottom = t; -+ printk("%s: Macronix chip detected, id:0x%04X, boot location forced " -+ "to %s\n", map->name, cfi->id, (t == 2) ? "bottom" : "top"); -+} -+#endif /* CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC */ -+ - static struct cfi_fixup cfi_fixup_table[] = { - #ifdef AMD_BOOTLOC_BUG - { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, -@@ -231,6 +273,9 @@ static struct cfi_fixup cfi_fixup_table[ - { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, - #endif - { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, -+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, }, -+#endif - { 0, 0, NULL, NULL } - }; - static struct cfi_fixup jedec_fixup_table[] = { -Index: linux-2.6.22.1/drivers/mtd/chips/Kconfig -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/chips/Kconfig -+++ linux-2.6.22.1/drivers/mtd/chips/Kconfig -@@ -196,6 +196,14 @@ config MTD_CFI_AMDSTD - provides support for one of those command sets, used on chips - including the AMD Am29LV320. - -+config MTD_CFI_FIXUP_MACRONIX_BOOTLOC -+ bool "Force bottom boot for Macronix flash chips" -+ depends on MTD_CFI_AMDSTD -+ help -+ Some Macronix flash chips have no/wrong boot-block location in the -+ CFI table, and the driver may detect the type incorrectly. Select -+ this if your board has such chip. -+ - config MTD_CFI_STAA - tristate "Support for ST (Advanced Architecture) flash chips" - depends on MTD_GEN_PROBE diff --git a/target/linux/adm5120-2.6/patches-2.6.22/101-cfi_fixup_macronix_bootloc.patch b/target/linux/adm5120-2.6/patches-2.6.22/101-cfi_fixup_macronix_bootloc.patch new file mode 100644 index 0000000000..84c45d2014 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/101-cfi_fixup_macronix_bootloc.patch @@ -0,0 +1,95 @@ +Index: linux-2.6.22.1/drivers/mtd/chips/cfi_cmdset_0002.c +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/chips/cfi_cmdset_0002.c ++++ linux-2.6.22.1/drivers/mtd/chips/cfi_cmdset_0002.c +@@ -47,12 +47,19 @@ + #define MANUFACTURER_AMD 0x0001 + #define MANUFACTURER_ATMEL 0x001F + #define MANUFACTURER_SST 0x00BF ++#define MANUFACTURER_MACRONIX 0x00C2 + #define SST49LF004B 0x0060 + #define SST49LF040B 0x0050 + #define SST49LF008A 0x005a + #define AT49BV6416 0x00d6 + #define MANUFACTURER_SAMSUNG 0x00ec + ++/* Macronix */ ++#define MX29LV160B 0x2249 /* MX29LV160 Bottom-boot chip */ ++#define MX29LV160T 0x22C4 /* MX29LV160 Top-boot chip */ ++#define MX29LV320B 0x22A8 /* MX29LV320 Bottom-boot chip */ ++#define MX29LV320T 0x22A7 /* MX29LV320 Top-boot chip */ ++ + static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); + static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); + static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); +@@ -217,6 +224,41 @@ static void fixup_use_atmel_lock(struct + mtd->flags |= MTD_STUPID_LOCK; + } + ++#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++/* ++ * Some Macronix chips has no/bad bootblock information in the CFI table ++ */ ++static void fixup_macronix_bootloc(struct mtd_info *mtd, void* param) ++{ ++ struct map_info *map = mtd->priv; ++ struct cfi_private *cfi = map->fldrv_priv; ++ struct cfi_pri_amdstd *extp = cfi->cmdset_priv; ++ __u8 t; ++ ++ switch (cfi->id) { ++ /* TODO: put affected chip ids here */ ++ case MX29LV160B: ++ case MX29LV320B: ++ t = 2; /* Bottom boot */ ++ break; ++ case MX29LV160T: ++ case MX29LV320T: ++ t = 3; /* Top boot */ ++ break; ++ default: ++ return; ++ } ++ ++ if (extp->TopBottom == t) ++ /* boot location detected by the CFI layer is correct */ ++ return; ++ ++ extp->TopBottom = t; ++ printk("%s: Macronix chip detected, id:0x%04X, boot location forced " ++ "to %s\n", map->name, cfi->id, (t == 2) ? "bottom" : "top"); ++} ++#endif /* CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC */ ++ + static struct cfi_fixup cfi_fixup_table[] = { + #ifdef AMD_BOOTLOC_BUG + { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, +@@ -231,6 +273,9 @@ static struct cfi_fixup cfi_fixup_table[ + { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, + #endif + { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, ++#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, }, ++#endif + { 0, 0, NULL, NULL } + }; + static struct cfi_fixup jedec_fixup_table[] = { +Index: linux-2.6.22.1/drivers/mtd/chips/Kconfig +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/chips/Kconfig ++++ linux-2.6.22.1/drivers/mtd/chips/Kconfig +@@ -196,6 +196,14 @@ config MTD_CFI_AMDSTD + provides support for one of those command sets, used on chips + including the AMD Am29LV320. + ++config MTD_CFI_FIXUP_MACRONIX_BOOTLOC ++ bool "Force bottom boot for Macronix flash chips" ++ depends on MTD_CFI_AMDSTD ++ help ++ Some Macronix flash chips have no/wrong boot-block location in the ++ CFI table, and the driver may detect the type incorrectly. Select ++ this if your board has such chip. ++ + config MTD_CFI_STAA + tristate "Support for ST (Advanced Architecture) flash chips" + depends on MTD_GEN_PROBE diff --git a/target/linux/adm5120-2.6/patches-2.6.22/102-jedec-pmc-39lvxxx-chips.patch b/target/linux/adm5120-2.6/patches-2.6.22/102-jedec-pmc-39lvxxx-chips.patch deleted file mode 100644 index abed363edb..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/102-jedec-pmc-39lvxxx-chips.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: linux-2.6.22.1/drivers/mtd/chips/jedec_probe.c -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/chips/jedec_probe.c -+++ linux-2.6.22.1/drivers/mtd/chips/jedec_probe.c -@@ -121,6 +121,10 @@ - #define UPD29F064115 0x221C - - /* PMC */ -+#define PM39LV512 0x001B -+#define PM39LV010 0x001C -+#define PM39LV020 0x003D -+#define PM39LV040 0x003E - #define PM49FL002 0x006D - #define PM49FL004 0x006E - #define PM49FL008 0x006A -@@ -1246,6 +1250,58 @@ static const struct amd_flash_info jedec - ERASEINFO(0x02000,2), - ERASEINFO(0x04000,1), - } -+ }, { -+ .mfr_id = MANUFACTURER_PMC, -+ .dev_id = PM39LV512, -+ .name = "PMC Pm39LV512", -+ .uaddr = { -+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ -+ }, -+ .DevSize = SIZE_64KiB, -+ .CmdSet = P_ID_AMD_STD, -+ .NumEraseRegions= 1, -+ .regions = { -+ ERASEINFO(0x01000,16), -+ } -+ }, { -+ .mfr_id = MANUFACTURER_PMC, -+ .dev_id = PM39LV010, -+ .name = "PMC Pm39LV010", -+ .uaddr = { -+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ -+ }, -+ .DevSize = SIZE_128KiB, -+ .CmdSet = P_ID_AMD_STD, -+ .NumEraseRegions= 1, -+ .regions = { -+ ERASEINFO(0x01000,32), -+ } -+ }, { -+ .mfr_id = MANUFACTURER_PMC, -+ .dev_id = PM39LV020, -+ .name = "PMC Pm39LV020", -+ .uaddr = { -+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ -+ }, -+ .DevSize = SIZE_256KiB, -+ .CmdSet = P_ID_AMD_STD, -+ .NumEraseRegions= 1, -+ .regions = { -+ ERASEINFO(0x01000,64), -+ } -+ }, { -+ .mfr_id = MANUFACTURER_PMC, -+ .dev_id = PM39LV040, -+ .name = "PMC Pm39LV040", -+ .uaddr = { -+ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ -+ }, -+ .DevSize = SIZE_512KiB, -+ .CmdSet = P_ID_AMD_STD, -+ .NumEraseRegions= 1, -+ .regions = { -+ ERASEINFO(0x01000,128), -+ } - }, { - .mfr_id = MANUFACTURER_PMC, - .dev_id = PM49FL002, diff --git a/target/linux/adm5120-2.6/patches-2.6.22/102-jedec_pmc_39lvxxx_chips.patch b/target/linux/adm5120-2.6/patches-2.6.22/102-jedec_pmc_39lvxxx_chips.patch new file mode 100644 index 0000000000..abed363edb --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/102-jedec_pmc_39lvxxx_chips.patch @@ -0,0 +1,74 @@ +Index: linux-2.6.22.1/drivers/mtd/chips/jedec_probe.c +=================================================================== +--- linux-2.6.22.1.orig/drivers/mtd/chips/jedec_probe.c ++++ linux-2.6.22.1/drivers/mtd/chips/jedec_probe.c +@@ -121,6 +121,10 @@ + #define UPD29F064115 0x221C + + /* PMC */ ++#define PM39LV512 0x001B ++#define PM39LV010 0x001C ++#define PM39LV020 0x003D ++#define PM39LV040 0x003E + #define PM49FL002 0x006D + #define PM49FL004 0x006E + #define PM49FL008 0x006A +@@ -1246,6 +1250,58 @@ static const struct amd_flash_info jedec + ERASEINFO(0x02000,2), + ERASEINFO(0x04000,1), + } ++ }, { ++ .mfr_id = MANUFACTURER_PMC, ++ .dev_id = PM39LV512, ++ .name = "PMC Pm39LV512", ++ .uaddr = { ++ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ ++ }, ++ .DevSize = SIZE_64KiB, ++ .CmdSet = P_ID_AMD_STD, ++ .NumEraseRegions= 1, ++ .regions = { ++ ERASEINFO(0x01000,16), ++ } ++ }, { ++ .mfr_id = MANUFACTURER_PMC, ++ .dev_id = PM39LV010, ++ .name = "PMC Pm39LV010", ++ .uaddr = { ++ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ ++ }, ++ .DevSize = SIZE_128KiB, ++ .CmdSet = P_ID_AMD_STD, ++ .NumEraseRegions= 1, ++ .regions = { ++ ERASEINFO(0x01000,32), ++ } ++ }, { ++ .mfr_id = MANUFACTURER_PMC, ++ .dev_id = PM39LV020, ++ .name = "PMC Pm39LV020", ++ .uaddr = { ++ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ ++ }, ++ .DevSize = SIZE_256KiB, ++ .CmdSet = P_ID_AMD_STD, ++ .NumEraseRegions= 1, ++ .regions = { ++ ERASEINFO(0x01000,64), ++ } ++ }, { ++ .mfr_id = MANUFACTURER_PMC, ++ .dev_id = PM39LV040, ++ .name = "PMC Pm39LV040", ++ .uaddr = { ++ [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ ++ }, ++ .DevSize = SIZE_512KiB, ++ .CmdSet = P_ID_AMD_STD, ++ .NumEraseRegions= 1, ++ .regions = { ++ ERASEINFO(0x01000,128), ++ } + }, { + .mfr_id = MANUFACTURER_PMC, + .dev_id = PM49FL002, diff --git a/target/linux/adm5120-2.6/patches-2.6.22/200-amba-pl010-hacks.patch b/target/linux/adm5120-2.6/patches-2.6.22/200-amba-pl010-hacks.patch deleted file mode 100644 index 840d5a4cf5..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/200-amba-pl010-hacks.patch +++ /dev/null @@ -1,297 +0,0 @@ -Index: linux/drivers/serial/amba-pl010.c -=================================================================== ---- linux.orig/drivers/serial/amba-pl010.c -+++ linux/drivers/serial/amba-pl010.c -@@ -52,11 +52,10 @@ - - #include - --#define UART_NR 8 -- - #define SERIAL_AMBA_MAJOR 204 - #define SERIAL_AMBA_MINOR 16 --#define SERIAL_AMBA_NR UART_NR -+#define SERIAL_AMBA_NR CONFIG_SERIAL_AMBA_PL010_NUMPORTS -+#define SERIAL_AMBA_NAME CONFIG_SERIAL_AMBA_PL010_PORTNAME - - #define AMBA_ISR_PASS_LIMIT 256 - -@@ -82,7 +81,7 @@ static void pl010_stop_tx(struct uart_po - struct uart_amba_port *uap = (struct uart_amba_port *)port; - unsigned int cr; - -- cr = readb(uap->port.membase + UART010_CR); -+ cr = readl(uap->port.membase + UART010_CR); - cr &= ~UART010_CR_TIE; - writel(cr, uap->port.membase + UART010_CR); - } -@@ -92,7 +91,7 @@ static void pl010_start_tx(struct uart_p - struct uart_amba_port *uap = (struct uart_amba_port *)port; - unsigned int cr; - -- cr = readb(uap->port.membase + UART010_CR); -+ cr = readl(uap->port.membase + UART010_CR); - cr |= UART010_CR_TIE; - writel(cr, uap->port.membase + UART010_CR); - } -@@ -102,7 +101,7 @@ static void pl010_stop_rx(struct uart_po - struct uart_amba_port *uap = (struct uart_amba_port *)port; - unsigned int cr; - -- cr = readb(uap->port.membase + UART010_CR); -+ cr = readl(uap->port.membase + UART010_CR); - cr &= ~(UART010_CR_RIE | UART010_CR_RTIE); - writel(cr, uap->port.membase + UART010_CR); - } -@@ -112,7 +111,7 @@ static void pl010_enable_ms(struct uart_ - struct uart_amba_port *uap = (struct uart_amba_port *)port; - unsigned int cr; - -- cr = readb(uap->port.membase + UART010_CR); -+ cr = readl(uap->port.membase + UART010_CR); - cr |= UART010_CR_MSIE; - writel(cr, uap->port.membase + UART010_CR); - } -@@ -122,9 +121,9 @@ static void pl010_rx_chars(struct uart_a - struct tty_struct *tty = uap->port.info->tty; - unsigned int status, ch, flag, rsr, max_count = 256; - -- status = readb(uap->port.membase + UART01x_FR); -+ status = readl(uap->port.membase + UART01x_FR); - while (UART_RX_DATA(status) && max_count--) { -- ch = readb(uap->port.membase + UART01x_DR); -+ ch = readl(uap->port.membase + UART01x_DR); - flag = TTY_NORMAL; - - uap->port.icount.rx++; -@@ -133,7 +132,7 @@ static void pl010_rx_chars(struct uart_a - * Note that the error handling code is - * out of the main execution path - */ -- rsr = readb(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; -+ rsr = readl(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; - if (unlikely(rsr & UART01x_RSR_ANY)) { - writel(0, uap->port.membase + UART01x_ECR); - -@@ -165,7 +164,7 @@ static void pl010_rx_chars(struct uart_a - uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag); - - ignore_char: -- status = readb(uap->port.membase + UART01x_FR); -+ status = readl(uap->port.membase + UART01x_FR); - } - spin_unlock(&uap->port.lock); - tty_flip_buffer_push(tty); -@@ -210,7 +209,7 @@ static void pl010_modem_status(struct ua - - writel(0, uap->port.membase + UART010_ICR); - -- status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; -+ status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; - - delta = status ^ uap->old_status; - uap->old_status = status; -@@ -238,7 +237,7 @@ static irqreturn_t pl010_int(int irq, vo - - spin_lock(&uap->port.lock); - -- status = readb(uap->port.membase + UART010_IIR); -+ status = readl(uap->port.membase + UART010_IIR); - if (status) { - do { - if (status & (UART010_IIR_RTIS | UART010_IIR_RIS)) -@@ -251,7 +250,7 @@ static irqreturn_t pl010_int(int irq, vo - if (pass_counter-- == 0) - break; - -- status = readb(uap->port.membase + UART010_IIR); -+ status = readl(uap->port.membase + UART010_IIR); - } while (status & (UART010_IIR_RTIS | UART010_IIR_RIS | - UART010_IIR_TIS)); - handled = 1; -@@ -265,7 +264,7 @@ static irqreturn_t pl010_int(int irq, vo - static unsigned int pl010_tx_empty(struct uart_port *port) - { - struct uart_amba_port *uap = (struct uart_amba_port *)port; -- unsigned int status = readb(uap->port.membase + UART01x_FR); -+ unsigned int status = readl(uap->port.membase + UART01x_FR); - return status & UART01x_FR_BUSY ? 0 : TIOCSER_TEMT; - } - -@@ -275,7 +274,7 @@ static unsigned int pl010_get_mctrl(stru - unsigned int result = 0; - unsigned int status; - -- status = readb(uap->port.membase + UART01x_FR); -+ status = readl(uap->port.membase + UART01x_FR); - if (status & UART01x_FR_DCD) - result |= TIOCM_CAR; - if (status & UART01x_FR_DSR) -@@ -301,7 +300,7 @@ static void pl010_break_ctl(struct uart_ - unsigned int lcr_h; - - spin_lock_irqsave(&uap->port.lock, flags); -- lcr_h = readb(uap->port.membase + UART010_LCRH); -+ lcr_h = readl(uap->port.membase + UART010_LCRH); - if (break_state == -1) - lcr_h |= UART01x_LCRH_BRK; - else -@@ -334,7 +333,7 @@ static int pl010_startup(struct uart_por - /* - * initialise the old status of the modem signals - */ -- uap->old_status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; -+ uap->old_status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; - - /* - * Finally, enable interrupts -@@ -365,7 +364,7 @@ static void pl010_shutdown(struct uart_p - writel(0, uap->port.membase + UART010_CR); - - /* disable break condition and fifos */ -- writel(readb(uap->port.membase + UART010_LCRH) & -+ writel(readl(uap->port.membase + UART010_LCRH) & - ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN), - uap->port.membase + UART010_LCRH); - -@@ -387,7 +386,7 @@ pl010_set_termios(struct uart_port *port - /* - * Ask the core to calculate the divisor for us. - */ -- baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); -+ baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); - quot = uart_get_divisor(port, baud); - - switch (termios->c_cflag & CSIZE) { -@@ -450,7 +449,7 @@ pl010_set_termios(struct uart_port *port - uap->port.ignore_status_mask |= UART_DUMMY_RSR_RX; - - /* first, disable everything */ -- old_cr = readb(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE; -+ old_cr = readl(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE; - - if (UART_ENABLE_MS(port, termios->c_cflag)) - old_cr |= UART010_CR_MSIE; -@@ -540,7 +539,7 @@ static struct uart_ops amba_pl010_pops = - .verify_port = pl010_verify_port, - }; - --static struct uart_amba_port *amba_ports[UART_NR]; -+static struct uart_amba_port *amba_ports[SERIAL_AMBA_NR]; - - #ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE - -@@ -550,7 +549,7 @@ static void pl010_console_putchar(struct - unsigned int status; - - do { -- status = readb(uap->port.membase + UART01x_FR); -+ status = readl(uap->port.membase + UART01x_FR); - barrier(); - } while (!UART_TX_READY(status)); - writel(ch, uap->port.membase + UART01x_DR); -@@ -567,7 +566,7 @@ pl010_console_write(struct console *co, - /* - * First save the CR then disable the interrupts - */ -- old_cr = readb(uap->port.membase + UART010_CR); -+ old_cr = readl(uap->port.membase + UART010_CR); - writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR); - - uart_console_write(&uap->port, s, count, pl010_console_putchar); -@@ -577,7 +576,7 @@ pl010_console_write(struct console *co, - * and restore the TCR - */ - do { -- status = readb(uap->port.membase + UART01x_FR); -+ status = readl(uap->port.membase + UART01x_FR); - barrier(); - } while (status & UART01x_FR_BUSY); - writel(old_cr, uap->port.membase + UART010_CR); -@@ -589,9 +588,9 @@ static void __init - pl010_console_get_options(struct uart_amba_port *uap, int *baud, - int *parity, int *bits) - { -- if (readb(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) { -+ if (readl(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) { - unsigned int lcr_h, quot; -- lcr_h = readb(uap->port.membase + UART010_LCRH); -+ lcr_h = readl(uap->port.membase + UART010_LCRH); - - *parity = 'n'; - if (lcr_h & UART01x_LCRH_PEN) { -@@ -606,8 +605,8 @@ pl010_console_get_options(struct uart_am - else - *bits = 8; - -- quot = readb(uap->port.membase + UART010_LCRL) | -- readb(uap->port.membase + UART010_LCRM) << 8; -+ quot = readl(uap->port.membase + UART010_LCRL) | -+ readl(uap->port.membase + UART010_LCRM) << 8; - *baud = uap->port.uartclk / (16 * (quot + 1)); - } - } -@@ -625,7 +624,7 @@ static int __init pl010_console_setup(st - * if so, search for the first available port that does have - * console support. - */ -- if (co->index >= UART_NR) -+ if (co->index >= SERIAL_AMBA_NR) - co->index = 0; - uap = amba_ports[co->index]; - if (!uap) -@@ -643,7 +642,7 @@ static int __init pl010_console_setup(st - - static struct uart_driver amba_reg; - static struct console amba_console = { -- .name = "ttyAM", -+ .name = SERIAL_AMBA_NAME, - .write = pl010_console_write, - .device = uart_console_device, - .setup = pl010_console_setup, -@@ -659,11 +658,11 @@ static struct console amba_console = { - - static struct uart_driver amba_reg = { - .owner = THIS_MODULE, -- .driver_name = "ttyAM", -- .dev_name = "ttyAM", -+ .driver_name = SERIAL_AMBA_NAME, -+ .dev_name = SERIAL_AMBA_NAME, - .major = SERIAL_AMBA_MAJOR, - .minor = SERIAL_AMBA_MINOR, -- .nr = UART_NR, -+ .nr = SERIAL_AMBA_NR, - .cons = AMBA_CONSOLE, - }; - -Index: linux/drivers/serial/Kconfig -=================================================================== ---- linux.orig/drivers/serial/Kconfig -+++ linux/drivers/serial/Kconfig -@@ -293,10 +293,25 @@ config SERIAL_AMBA_PL010 - help - This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have - an Integrator/AP or Integrator/PP2 platform, or if you have a -- Cirrus Logic EP93xx CPU, say Y or M here. -+ Cirrus Logic EP93xx CPU or an Infineon ADM5120 SOC, say Y or M here. - - If unsure, say N. - -+config SERIAL_AMBA_PL010_NUMPORTS -+ int "Maximum number of AMBA PL010 serial ports" -+ depends on SERIAL_AMBA_PL010 -+ default "8" -+ ---help--- -+ Set this to the number of serial ports you want the AMBA PL010 driver -+ to support. -+ -+config SERIAL_AMBA_PL010_PORTNAME -+ string "Name of the AMBA PL010 serial ports" -+ depends on SERIAL_AMBA_PL010 -+ default "ttyAM" -+ ---help--- -+ ::: To be written ::: -+ - config SERIAL_AMBA_PL010_CONSOLE - bool "Support for console on AMBA serial port" - depends on SERIAL_AMBA_PL010=y diff --git a/target/linux/adm5120-2.6/patches-2.6.22/200-amba_pl010_hacks.patch b/target/linux/adm5120-2.6/patches-2.6.22/200-amba_pl010_hacks.patch new file mode 100644 index 0000000000..840d5a4cf5 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/200-amba_pl010_hacks.patch @@ -0,0 +1,297 @@ +Index: linux/drivers/serial/amba-pl010.c +=================================================================== +--- linux.orig/drivers/serial/amba-pl010.c ++++ linux/drivers/serial/amba-pl010.c +@@ -52,11 +52,10 @@ + + #include + +-#define UART_NR 8 +- + #define SERIAL_AMBA_MAJOR 204 + #define SERIAL_AMBA_MINOR 16 +-#define SERIAL_AMBA_NR UART_NR ++#define SERIAL_AMBA_NR CONFIG_SERIAL_AMBA_PL010_NUMPORTS ++#define SERIAL_AMBA_NAME CONFIG_SERIAL_AMBA_PL010_PORTNAME + + #define AMBA_ISR_PASS_LIMIT 256 + +@@ -82,7 +81,7 @@ static void pl010_stop_tx(struct uart_po + struct uart_amba_port *uap = (struct uart_amba_port *)port; + unsigned int cr; + +- cr = readb(uap->port.membase + UART010_CR); ++ cr = readl(uap->port.membase + UART010_CR); + cr &= ~UART010_CR_TIE; + writel(cr, uap->port.membase + UART010_CR); + } +@@ -92,7 +91,7 @@ static void pl010_start_tx(struct uart_p + struct uart_amba_port *uap = (struct uart_amba_port *)port; + unsigned int cr; + +- cr = readb(uap->port.membase + UART010_CR); ++ cr = readl(uap->port.membase + UART010_CR); + cr |= UART010_CR_TIE; + writel(cr, uap->port.membase + UART010_CR); + } +@@ -102,7 +101,7 @@ static void pl010_stop_rx(struct uart_po + struct uart_amba_port *uap = (struct uart_amba_port *)port; + unsigned int cr; + +- cr = readb(uap->port.membase + UART010_CR); ++ cr = readl(uap->port.membase + UART010_CR); + cr &= ~(UART010_CR_RIE | UART010_CR_RTIE); + writel(cr, uap->port.membase + UART010_CR); + } +@@ -112,7 +111,7 @@ static void pl010_enable_ms(struct uart_ + struct uart_amba_port *uap = (struct uart_amba_port *)port; + unsigned int cr; + +- cr = readb(uap->port.membase + UART010_CR); ++ cr = readl(uap->port.membase + UART010_CR); + cr |= UART010_CR_MSIE; + writel(cr, uap->port.membase + UART010_CR); + } +@@ -122,9 +121,9 @@ static void pl010_rx_chars(struct uart_a + struct tty_struct *tty = uap->port.info->tty; + unsigned int status, ch, flag, rsr, max_count = 256; + +- status = readb(uap->port.membase + UART01x_FR); ++ status = readl(uap->port.membase + UART01x_FR); + while (UART_RX_DATA(status) && max_count--) { +- ch = readb(uap->port.membase + UART01x_DR); ++ ch = readl(uap->port.membase + UART01x_DR); + flag = TTY_NORMAL; + + uap->port.icount.rx++; +@@ -133,7 +132,7 @@ static void pl010_rx_chars(struct uart_a + * Note that the error handling code is + * out of the main execution path + */ +- rsr = readb(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; ++ rsr = readl(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX; + if (unlikely(rsr & UART01x_RSR_ANY)) { + writel(0, uap->port.membase + UART01x_ECR); + +@@ -165,7 +164,7 @@ static void pl010_rx_chars(struct uart_a + uart_insert_char(&uap->port, rsr, UART01x_RSR_OE, ch, flag); + + ignore_char: +- status = readb(uap->port.membase + UART01x_FR); ++ status = readl(uap->port.membase + UART01x_FR); + } + spin_unlock(&uap->port.lock); + tty_flip_buffer_push(tty); +@@ -210,7 +209,7 @@ static void pl010_modem_status(struct ua + + writel(0, uap->port.membase + UART010_ICR); + +- status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; ++ status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; + + delta = status ^ uap->old_status; + uap->old_status = status; +@@ -238,7 +237,7 @@ static irqreturn_t pl010_int(int irq, vo + + spin_lock(&uap->port.lock); + +- status = readb(uap->port.membase + UART010_IIR); ++ status = readl(uap->port.membase + UART010_IIR); + if (status) { + do { + if (status & (UART010_IIR_RTIS | UART010_IIR_RIS)) +@@ -251,7 +250,7 @@ static irqreturn_t pl010_int(int irq, vo + if (pass_counter-- == 0) + break; + +- status = readb(uap->port.membase + UART010_IIR); ++ status = readl(uap->port.membase + UART010_IIR); + } while (status & (UART010_IIR_RTIS | UART010_IIR_RIS | + UART010_IIR_TIS)); + handled = 1; +@@ -265,7 +264,7 @@ static irqreturn_t pl010_int(int irq, vo + static unsigned int pl010_tx_empty(struct uart_port *port) + { + struct uart_amba_port *uap = (struct uart_amba_port *)port; +- unsigned int status = readb(uap->port.membase + UART01x_FR); ++ unsigned int status = readl(uap->port.membase + UART01x_FR); + return status & UART01x_FR_BUSY ? 0 : TIOCSER_TEMT; + } + +@@ -275,7 +274,7 @@ static unsigned int pl010_get_mctrl(stru + unsigned int result = 0; + unsigned int status; + +- status = readb(uap->port.membase + UART01x_FR); ++ status = readl(uap->port.membase + UART01x_FR); + if (status & UART01x_FR_DCD) + result |= TIOCM_CAR; + if (status & UART01x_FR_DSR) +@@ -301,7 +300,7 @@ static void pl010_break_ctl(struct uart_ + unsigned int lcr_h; + + spin_lock_irqsave(&uap->port.lock, flags); +- lcr_h = readb(uap->port.membase + UART010_LCRH); ++ lcr_h = readl(uap->port.membase + UART010_LCRH); + if (break_state == -1) + lcr_h |= UART01x_LCRH_BRK; + else +@@ -334,7 +333,7 @@ static int pl010_startup(struct uart_por + /* + * initialise the old status of the modem signals + */ +- uap->old_status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; ++ uap->old_status = readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; + + /* + * Finally, enable interrupts +@@ -365,7 +364,7 @@ static void pl010_shutdown(struct uart_p + writel(0, uap->port.membase + UART010_CR); + + /* disable break condition and fifos */ +- writel(readb(uap->port.membase + UART010_LCRH) & ++ writel(readl(uap->port.membase + UART010_LCRH) & + ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN), + uap->port.membase + UART010_LCRH); + +@@ -387,7 +386,7 @@ pl010_set_termios(struct uart_port *port + /* + * Ask the core to calculate the divisor for us. + */ +- baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); ++ baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); + quot = uart_get_divisor(port, baud); + + switch (termios->c_cflag & CSIZE) { +@@ -450,7 +449,7 @@ pl010_set_termios(struct uart_port *port + uap->port.ignore_status_mask |= UART_DUMMY_RSR_RX; + + /* first, disable everything */ +- old_cr = readb(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE; ++ old_cr = readl(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE; + + if (UART_ENABLE_MS(port, termios->c_cflag)) + old_cr |= UART010_CR_MSIE; +@@ -540,7 +539,7 @@ static struct uart_ops amba_pl010_pops = + .verify_port = pl010_verify_port, + }; + +-static struct uart_amba_port *amba_ports[UART_NR]; ++static struct uart_amba_port *amba_ports[SERIAL_AMBA_NR]; + + #ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE + +@@ -550,7 +549,7 @@ static void pl010_console_putchar(struct + unsigned int status; + + do { +- status = readb(uap->port.membase + UART01x_FR); ++ status = readl(uap->port.membase + UART01x_FR); + barrier(); + } while (!UART_TX_READY(status)); + writel(ch, uap->port.membase + UART01x_DR); +@@ -567,7 +566,7 @@ pl010_console_write(struct console *co, + /* + * First save the CR then disable the interrupts + */ +- old_cr = readb(uap->port.membase + UART010_CR); ++ old_cr = readl(uap->port.membase + UART010_CR); + writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR); + + uart_console_write(&uap->port, s, count, pl010_console_putchar); +@@ -577,7 +576,7 @@ pl010_console_write(struct console *co, + * and restore the TCR + */ + do { +- status = readb(uap->port.membase + UART01x_FR); ++ status = readl(uap->port.membase + UART01x_FR); + barrier(); + } while (status & UART01x_FR_BUSY); + writel(old_cr, uap->port.membase + UART010_CR); +@@ -589,9 +588,9 @@ static void __init + pl010_console_get_options(struct uart_amba_port *uap, int *baud, + int *parity, int *bits) + { +- if (readb(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) { ++ if (readl(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) { + unsigned int lcr_h, quot; +- lcr_h = readb(uap->port.membase + UART010_LCRH); ++ lcr_h = readl(uap->port.membase + UART010_LCRH); + + *parity = 'n'; + if (lcr_h & UART01x_LCRH_PEN) { +@@ -606,8 +605,8 @@ pl010_console_get_options(struct uart_am + else + *bits = 8; + +- quot = readb(uap->port.membase + UART010_LCRL) | +- readb(uap->port.membase + UART010_LCRM) << 8; ++ quot = readl(uap->port.membase + UART010_LCRL) | ++ readl(uap->port.membase + UART010_LCRM) << 8; + *baud = uap->port.uartclk / (16 * (quot + 1)); + } + } +@@ -625,7 +624,7 @@ static int __init pl010_console_setup(st + * if so, search for the first available port that does have + * console support. + */ +- if (co->index >= UART_NR) ++ if (co->index >= SERIAL_AMBA_NR) + co->index = 0; + uap = amba_ports[co->index]; + if (!uap) +@@ -643,7 +642,7 @@ static int __init pl010_console_setup(st + + static struct uart_driver amba_reg; + static struct console amba_console = { +- .name = "ttyAM", ++ .name = SERIAL_AMBA_NAME, + .write = pl010_console_write, + .device = uart_console_device, + .setup = pl010_console_setup, +@@ -659,11 +658,11 @@ static struct console amba_console = { + + static struct uart_driver amba_reg = { + .owner = THIS_MODULE, +- .driver_name = "ttyAM", +- .dev_name = "ttyAM", ++ .driver_name = SERIAL_AMBA_NAME, ++ .dev_name = SERIAL_AMBA_NAME, + .major = SERIAL_AMBA_MAJOR, + .minor = SERIAL_AMBA_MINOR, +- .nr = UART_NR, ++ .nr = SERIAL_AMBA_NR, + .cons = AMBA_CONSOLE, + }; + +Index: linux/drivers/serial/Kconfig +=================================================================== +--- linux.orig/drivers/serial/Kconfig ++++ linux/drivers/serial/Kconfig +@@ -293,10 +293,25 @@ config SERIAL_AMBA_PL010 + help + This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have + an Integrator/AP or Integrator/PP2 platform, or if you have a +- Cirrus Logic EP93xx CPU, say Y or M here. ++ Cirrus Logic EP93xx CPU or an Infineon ADM5120 SOC, say Y or M here. + + If unsure, say N. + ++config SERIAL_AMBA_PL010_NUMPORTS ++ int "Maximum number of AMBA PL010 serial ports" ++ depends on SERIAL_AMBA_PL010 ++ default "8" ++ ---help--- ++ Set this to the number of serial ports you want the AMBA PL010 driver ++ to support. ++ ++config SERIAL_AMBA_PL010_PORTNAME ++ string "Name of the AMBA PL010 serial ports" ++ depends on SERIAL_AMBA_PL010 ++ default "ttyAM" ++ ---help--- ++ ::: To be written ::: ++ + config SERIAL_AMBA_PL010_CONSOLE + bool "Support for console on AMBA serial port" + depends on SERIAL_AMBA_PL010=y diff --git a/target/linux/adm5120-2.6/patches-2.6.22/201-amba-bus-hacks.patch b/target/linux/adm5120-2.6/patches-2.6.22/201-amba-bus-hacks.patch deleted file mode 100644 index 3b92f25611..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/201-amba-bus-hacks.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: linux/drivers/amba/bus.c -=================================================================== ---- linux.orig/drivers/amba/bus.c -+++ linux/drivers/amba/bus.c -@@ -17,6 +17,10 @@ - #include - #include - -+#ifndef NO_IRQ -+#define NO_IRQ (-1) -+#endif -+ - #define to_amba_device(d) container_of(d, struct amba_device, dev) - #define to_amba_driver(d) container_of(d, struct amba_driver, drv) - diff --git a/target/linux/adm5120-2.6/patches-2.6.22/201-amba_bus_hacks.patch b/target/linux/adm5120-2.6/patches-2.6.22/201-amba_bus_hacks.patch new file mode 100644 index 0000000000..3b92f25611 --- /dev/null +++ b/target/linux/adm5120-2.6/patches-2.6.22/201-amba_bus_hacks.patch @@ -0,0 +1,15 @@ +Index: linux/drivers/amba/bus.c +=================================================================== +--- linux.orig/drivers/amba/bus.c ++++ linux/drivers/amba/bus.c +@@ -17,6 +17,10 @@ + #include + #include + ++#ifndef NO_IRQ ++#define NO_IRQ (-1) ++#endif ++ + #define to_amba_device(d) container_of(d, struct amba_device, dev) + #define to_amba_driver(d) container_of(d, struct amba_driver, drv) + diff --git a/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch b/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch deleted file mode 100644 index 79915e0281..0000000000 --- a/target/linux/adm5120-2.6/patches-2.6.22/500-Nand.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: linux-2.6.22.1/drivers/mtd/nand/Kconfig -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/nand/Kconfig -+++ linux-2.6.22.1/drivers/mtd/nand/Kconfig -@@ -81,6 +81,12 @@ config MTD_NAND_TS7250 - help - Support for NAND flash on Technologic Systems TS-7250 platform. - -+config MTD_NAND_RB100 -+ tristate "NAND Flash device on RB100 board" -+ depends on MTD_NAND -+ help -+ Support for NAND flash on RB100 platform. -+ - config MTD_NAND_IDS - tristate - -Index: linux-2.6.22.1/drivers/mtd/nand/Makefile -=================================================================== ---- linux-2.6.22.1.orig/drivers/mtd/nand/Makefile -+++ linux-2.6.22.1/drivers/mtd/nand/Makefile -@@ -10,6 +10,7 @@ obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nan - obj-$(CONFIG_MTD_NAND_SPIA) += spia.o - obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o - obj-$(CONFIG_MTD_NAND_TOTO) += toto.o -+obj-$(CONFIG_MTD_NAND_RB100) += rbmipsnand.o - obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o - obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o - obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o -- cgit v1.2.3