remove 2.6.34 support
SVN-Revision: 26229
This commit is contained in:
parent
de69f84399
commit
a8d84ae94d
189 changed files with 0 additions and 50474 deletions
|
@ -1,58 +0,0 @@
|
|||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -23,6 +23,21 @@ choice
|
||||
prompt "System type"
|
||||
default SGI_IP22
|
||||
|
||||
+config ADM5120
|
||||
+ bool "Infineon/ADMtek ADM5120 SoC based machines"
|
||||
+ select CEVT_R4K
|
||||
+ select CSRC_R4K
|
||||
+ select SYS_HAS_CPU_MIPS32_R1
|
||||
+ select SYS_HAS_EARLY_PRINTK
|
||||
+ select DMA_NONCOHERENT
|
||||
+ select IRQ_CPU
|
||||
+ select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
+ select SYS_SUPPORTS_BIG_ENDIAN
|
||||
+ select SYS_SUPPORTS_32BIT_KERNEL
|
||||
+ select ARCH_REQUIRE_GPIOLIB
|
||||
+ select SWAP_IO_SPACE if CPU_BIG_ENDIAN
|
||||
+ select MIPS_MACHINE
|
||||
+
|
||||
config MACH_ALCHEMY
|
||||
bool "Alchemy processor based machines"
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
@@ -683,6 +698,7 @@ config CAVIUM_OCTEON_REFERENCE_BOARD
|
||||
|
||||
endchoice
|
||||
|
||||
+source "arch/mips/adm5120/Kconfig"
|
||||
source "arch/mips/alchemy/Kconfig"
|
||||
source "arch/mips/bcm63xx/Kconfig"
|
||||
source "arch/mips/jazz/Kconfig"
|
||||
--- a/arch/mips/Makefile
|
||||
+++ b/arch/mips/Makefile
|
||||
@@ -227,6 +227,23 @@ cflags-$(CONFIG_MACH_JAZZ) += -I$(srctre
|
||||
load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
|
||||
|
||||
#
|
||||
+# Infineon/ADMtek ADM5120
|
||||
+#
|
||||
+libs-$(CONFIG_ADM5120) += arch/mips/adm5120/prom/
|
||||
+core-$(CONFIG_ADM5120) += arch/mips/adm5120/common/
|
||||
+core-$(CONFIG_ADM5120_OEM_CELLVISION) += arch/mips/adm5120/cellvision/
|
||||
+core-$(CONFIG_ADM5120_OEM_COMPEX) += arch/mips/adm5120/compex/
|
||||
+core-$(CONFIG_ADM5120_OEM_EDIMAX) += arch/mips/adm5120/edimax/
|
||||
+core-$(CONFIG_ADM5120_OEM_GENERIC) += arch/mips/adm5120/generic/
|
||||
+core-$(CONFIG_ADM5120_OEM_INFINEON) += arch/mips/adm5120/infineon/
|
||||
+core-$(CONFIG_ADM5120_OEM_MIKROTIK) += arch/mips/adm5120/mikrotik/
|
||||
+core-$(CONFIG_ADM5120_OEM_MOTOROLA) += arch/mips/adm5120/motorola/
|
||||
+core-$(CONFIG_ADM5120_OEM_OSBRIDGE) += arch/mips/adm5120/osbridge/
|
||||
+core-$(CONFIG_ADM5120_OEM_ZYXEL) += arch/mips/adm5120/zyxel/
|
||||
+cflags-$(CONFIG_ADM5120) += -I$(srctree)/arch/mips/include/asm/mach-adm5120
|
||||
+load-$(CONFIG_ADM5120) += 0xffffffff80001000
|
||||
+
|
||||
+#
|
||||
# Common Alchemy Au1x00 stuff
|
||||
#
|
||||
core-$(CONFIG_SOC_AU1X00) += arch/mips/alchemy/common/
|
|
@ -1,21 +0,0 @@
|
|||
--- a/drivers/mtd/maps/Kconfig
|
||||
+++ b/drivers/mtd/maps/Kconfig
|
||||
@@ -551,4 +551,8 @@ config MTD_PISMO
|
||||
|
||||
When built as a module, it will be called pismo.ko
|
||||
|
||||
+config MTD_ADM5120
|
||||
+ tristate "Map driver for ADM5120 based boards"
|
||||
+ depends on ADM5120
|
||||
+
|
||||
endmenu
|
||||
--- a/drivers/mtd/maps/Makefile
|
||||
+++ b/drivers/mtd/maps/Makefile
|
||||
@@ -40,6 +40,7 @@ obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx2
|
||||
obj-$(CONFIG_MTD_DBOX2) += dbox2-flash.o
|
||||
obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
|
||||
obj-$(CONFIG_MTD_PCI) += pci.o
|
||||
+obj-$(CONFIG_MTD_ADM5120) += adm5120-flash.o
|
||||
obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
|
||||
obj-$(CONFIG_MTD_EDB7312) += edb7312.o
|
||||
obj-$(CONFIG_MTD_IMPA7) += impa7.o
|
|
@ -1,23 +0,0 @@
|
|||
--- a/drivers/net/Kconfig
|
||||
+++ b/drivers/net/Kconfig
|
||||
@@ -614,6 +614,10 @@ config MIPS_AU1X00_ENET
|
||||
If you have an Alchemy Semi AU1X00 based system
|
||||
say Y. Otherwise, say N.
|
||||
|
||||
+config ADM5120_ENET
|
||||
+ tristate "ADM5120 Ethernet switch support"
|
||||
+ depends on ADM5120
|
||||
+
|
||||
config SGI_IOC3_ETH
|
||||
bool "SGI IOC3 Ethernet"
|
||||
depends on PCI && SGI_IP27
|
||||
--- a/drivers/net/Makefile
|
||||
+++ b/drivers/net/Makefile
|
||||
@@ -213,6 +213,7 @@ obj-$(CONFIG_SC92031) += sc92031.o
|
||||
# This is also a 82596 and should probably be merged
|
||||
obj-$(CONFIG_LP486E) += lp486e.o
|
||||
|
||||
+obj-$(CONFIG_ADM5120_ENET) += adm5120sw.o
|
||||
obj-$(CONFIG_ETH16I) += eth16i.o
|
||||
obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
|
||||
obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
|
|
@ -1,33 +0,0 @@
|
|||
--- a/drivers/usb/Makefile
|
||||
+++ b/drivers/usb/Makefile
|
||||
@@ -9,6 +9,7 @@ obj-$(CONFIG_USB) += core/
|
||||
obj-$(CONFIG_USB_MON) += mon/
|
||||
|
||||
obj-$(CONFIG_PCI) += host/
|
||||
+obj-$(CONFIG_USB_ADM5120_HCD) += host/
|
||||
obj-$(CONFIG_USB_EHCI_HCD) += host/
|
||||
obj-$(CONFIG_USB_ISP116X_HCD) += host/
|
||||
obj-$(CONFIG_USB_OHCI_HCD) += host/
|
||||
--- a/drivers/usb/host/Kconfig
|
||||
+++ b/drivers/usb/host/Kconfig
|
||||
@@ -4,6 +4,10 @@
|
||||
comment "USB Host Controller Drivers"
|
||||
depends on USB
|
||||
|
||||
+config USB_ADM5120_HCD
|
||||
+ tristate "ADM5120 HCD support (EXPERIMENTAL)"
|
||||
+ depends on USB && ADM5120 && EXPERIMENTAL
|
||||
+
|
||||
config USB_C67X00_HCD
|
||||
tristate "Cypress C67x00 HCD support"
|
||||
depends on USB
|
||||
--- a/drivers/usb/host/Makefile
|
||||
+++ b/drivers/usb/host/Makefile
|
||||
@@ -18,6 +18,7 @@ obj-$(CONFIG_USB_WHCI_HCD) += whci/
|
||||
|
||||
obj-$(CONFIG_PCI) += pci-quirks.o
|
||||
|
||||
+obj-$(CONFIG_USB_ADM5120_HCD) += adm5120-hcd.o
|
||||
obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
|
||||
obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o
|
||||
obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
|
|
@ -1,22 +0,0 @@
|
|||
--- a/arch/mips/pci/Makefile
|
||||
+++ b/arch/mips/pci/Makefile
|
||||
@@ -55,6 +55,7 @@ obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capc
|
||||
obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
|
||||
obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o
|
||||
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o
|
||||
+obj-$(CONFIG_ADM5120) += pci-adm5120.o
|
||||
|
||||
ifdef CONFIG_PCI_MSI
|
||||
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o
|
||||
--- a/include/linux/pci_ids.h
|
||||
+++ b/include/linux/pci_ids.h
|
||||
@@ -1753,6 +1753,9 @@
|
||||
#define PCI_VENDOR_ID_ESDGMBH 0x12fe
|
||||
#define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111
|
||||
|
||||
+#define PCI_VENDOR_ID_ADMTEK 0x1317
|
||||
+#define PCI_DEVICE_ID_ADMTEK_ADM5120 0x5120
|
||||
+
|
||||
#define PCI_VENDOR_ID_SIIG 0x131f
|
||||
#define PCI_SUBVENDOR_ID_SIIG 0x131f
|
||||
#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
|
|
@ -1,22 +0,0 @@
|
|||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -372,4 +372,12 @@ config LEDS_TRIGGER_USBDEV
|
||||
This allows LEDs to be controlled by the presence/activity of
|
||||
an USB device. If unsure, say N.
|
||||
|
||||
+config LEDS_TRIGGER_ADM5120_SWITCH
|
||||
+ tristate "LED ADM5120 Switch Port Status Trigger"
|
||||
+ depends on LEDS_TRIGGERS && ADM5120
|
||||
+ help
|
||||
+ This allows LEDs to be controlled by the port states of
|
||||
+ the ADM5120 built-in Ethernet Switch
|
||||
+ If unsure, say N.
|
||||
+
|
||||
endif # NEW_LEDS
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -49,3 +49,4 @@ obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) +=
|
||||
obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_NETDEV) += ledtrig-netdev.o
|
||||
obj-$(CONFIG_LEDS_TRIGGER_USBDEV) += ledtrig-usbdev.o
|
||||
+obj-$(CONFIG_LEDS_TRIGGER_ADM5120_SWITCH) += ledtrig-adm5120-switch.o
|
|
@ -1,84 +0,0 @@
|
|||
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
@@ -52,6 +52,12 @@
|
||||
#define SST49LF008A 0x005a
|
||||
#define AT49BV6416 0x00d6
|
||||
|
||||
+/* 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 *);
|
||||
@@ -282,6 +288,41 @@ static void fixup_s29gl032n_sectors(stru
|
||||
}
|
||||
}
|
||||
|
||||
+#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[] = {
|
||||
{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
|
||||
#ifdef AMD_BOOTLOC_BUG
|
||||
@@ -318,6 +359,9 @@ static struct cfi_fixup fixup_table[] =
|
||||
*/
|
||||
{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip, NULL },
|
||||
{ CFI_MFR_ATMEL, AT49BV6416, fixup_use_atmel_lock, NULL },
|
||||
+#ifdef CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC
|
||||
+ { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_macronix_bootloc, NULL, },
|
||||
+#endif
|
||||
{ 0, 0, NULL, NULL }
|
||||
};
|
||||
|
||||
--- a/drivers/mtd/chips/Kconfig
|
||||
+++ b/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 "Fix boot-block location 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
|
|
@ -1,68 +0,0 @@
|
|||
--- a/drivers/mtd/chips/jedec_probe.c
|
||||
+++ b/drivers/mtd/chips/jedec_probe.c
|
||||
@@ -133,6 +133,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
|
||||
@@ -1275,6 +1279,54 @@ static const struct amd_flash_info jedec
|
||||
ERASEINFO(0x02000,2),
|
||||
ERASEINFO(0x04000,1),
|
||||
}
|
||||
+ }, {
|
||||
+ .mfr_id = MANUFACTURER_PMC,
|
||||
+ .dev_id = PM39LV512,
|
||||
+ .name = "PMC Pm39LV512",
|
||||
+ .devtypes = CFI_DEVICETYPE_X8,
|
||||
+ .uaddr = MTD_UADDR_0x0555_0x02AA,
|
||||
+ .dev_size = SIZE_64KiB,
|
||||
+ .cmd_set = P_ID_AMD_STD,
|
||||
+ .nr_regions = 1,
|
||||
+ .regions = {
|
||||
+ ERASEINFO(0x01000,16),
|
||||
+ }
|
||||
+ }, {
|
||||
+ .mfr_id = MANUFACTURER_PMC,
|
||||
+ .dev_id = PM39LV010,
|
||||
+ .name = "PMC Pm39LV010",
|
||||
+ .devtypes = CFI_DEVICETYPE_X8,
|
||||
+ .uaddr = MTD_UADDR_0x0555_0x02AA,
|
||||
+ .dev_size = SIZE_128KiB,
|
||||
+ .cmd_set = P_ID_AMD_STD,
|
||||
+ .nr_regions = 1,
|
||||
+ .regions = {
|
||||
+ ERASEINFO(0x01000,32),
|
||||
+ }
|
||||
+ }, {
|
||||
+ .mfr_id = MANUFACTURER_PMC,
|
||||
+ .dev_id = PM39LV020,
|
||||
+ .name = "PMC Pm39LV020",
|
||||
+ .devtypes = CFI_DEVICETYPE_X8,
|
||||
+ .uaddr = MTD_UADDR_0x0555_0x02AA,
|
||||
+ .dev_size = SIZE_256KiB,
|
||||
+ .cmd_set = P_ID_AMD_STD,
|
||||
+ .nr_regions = 1,
|
||||
+ .regions = {
|
||||
+ ERASEINFO(0x01000,64),
|
||||
+ }
|
||||
+ }, {
|
||||
+ .mfr_id = MANUFACTURER_PMC,
|
||||
+ .dev_id = PM39LV040,
|
||||
+ .name = "PMC Pm39LV040",
|
||||
+ .devtypes = CFI_DEVICETYPE_X8,
|
||||
+ .uaddr = MTD_UADDR_0x0555_0x02AA,
|
||||
+ .dev_size = SIZE_512KiB,
|
||||
+ .cmd_set = P_ID_AMD_STD,
|
||||
+ .nr_regions = 1,
|
||||
+ .regions = {
|
||||
+ ERASEINFO(0x01000,128),
|
||||
+ }
|
||||
}, {
|
||||
.mfr_id = MANUFACTURER_PMC,
|
||||
.dev_id = PM49FL002,
|
|
@ -1,24 +0,0 @@
|
|||
--- a/drivers/mtd/Kconfig
|
||||
+++ b/drivers/mtd/Kconfig
|
||||
@@ -63,6 +63,11 @@ config MTD_ROOTFS_SPLIT
|
||||
depends on MTD_PARTITIONS
|
||||
default y
|
||||
|
||||
+config MTD_TRXSPLIT
|
||||
+ bool "Automatically find and split TRX partitions"
|
||||
+ depends on MTD_PARTITIONS
|
||||
+ default n
|
||||
+
|
||||
config MTD_REDBOOT_PARTS
|
||||
tristate "RedBoot partition table parsing"
|
||||
depends on MTD_PARTITIONS
|
||||
--- a/drivers/mtd/Makefile
|
||||
+++ b/drivers/mtd/Makefile
|
||||
@@ -8,6 +8,7 @@ mtd-y := mtdcore.o mtdsuper.o
|
||||
mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
|
||||
|
||||
obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
|
||||
+obj-$(CONFIG_MTD_TRXSPLIT) += trxsplit.o
|
||||
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
|
||||
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
|
||||
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
|
@ -1,28 +0,0 @@
|
|||
--- a/drivers/ata/Makefile
|
||||
+++ b/drivers/ata/Makefile
|
||||
@@ -79,6 +79,7 @@ obj-$(CONFIG_PATA_PLATFORM) += pata_plat
|
||||
obj-$(CONFIG_PATA_AT91) += pata_at91.o
|
||||
obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
|
||||
obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
|
||||
+obj-$(CONFIG_PATA_RB153_CF) += pata_rb153_cf.o
|
||||
# Should be last but two libata driver
|
||||
obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
|
||||
# Should be last but one libata driver
|
||||
--- a/drivers/ata/Kconfig
|
||||
+++ b/drivers/ata/Kconfig
|
||||
@@ -604,6 +604,15 @@ config PATA_RADISYS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config PATA_RB153_CF
|
||||
+ tristate "RouterBOARD 153 Compact Flash support"
|
||||
+ depends on ADM5120_MACH_RB_153
|
||||
+ help
|
||||
+ This option enables support for a Compact Flash connected on
|
||||
+ the RouterBOARD 153.
|
||||
+
|
||||
+ If unsure, say N.
|
||||
+
|
||||
config PATA_RB532
|
||||
tristate "RouterBoard 532 PATA CompactFlash support"
|
||||
depends on MIKROTIK_RB532
|
|
@ -1,378 +0,0 @@
|
|||
--- a/drivers/serial/amba-pl010.c
|
||||
+++ b/drivers/serial/amba-pl010.c
|
||||
@@ -51,11 +51,10 @@
|
||||
|
||||
#include <asm/io.h>
|
||||
|
||||
-#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
|
||||
|
||||
@@ -81,9 +80,9 @@ 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 = __raw_readl(uap->port.membase + UART010_CR);
|
||||
cr &= ~UART010_CR_TIE;
|
||||
- writel(cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(cr, uap->port.membase + UART010_CR);
|
||||
}
|
||||
|
||||
static void pl010_start_tx(struct uart_port *port)
|
||||
@@ -91,9 +90,9 @@ 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 = __raw_readl(uap->port.membase + UART010_CR);
|
||||
cr |= UART010_CR_TIE;
|
||||
- writel(cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(cr, uap->port.membase + UART010_CR);
|
||||
}
|
||||
|
||||
static void pl010_stop_rx(struct uart_port *port)
|
||||
@@ -101,9 +100,9 @@ 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 = __raw_readl(uap->port.membase + UART010_CR);
|
||||
cr &= ~(UART010_CR_RIE | UART010_CR_RTIE);
|
||||
- writel(cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(cr, uap->port.membase + UART010_CR);
|
||||
}
|
||||
|
||||
static void pl010_enable_ms(struct uart_port *port)
|
||||
@@ -111,9 +110,9 @@ 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 = __raw_readl(uap->port.membase + UART010_CR);
|
||||
cr |= UART010_CR_MSIE;
|
||||
- writel(cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(cr, uap->port.membase + UART010_CR);
|
||||
}
|
||||
|
||||
static void pl010_rx_chars(struct uart_amba_port *uap)
|
||||
@@ -121,9 +120,9 @@ static void pl010_rx_chars(struct uart_a
|
||||
struct tty_struct *tty = uap->port.state->port.tty;
|
||||
unsigned int status, ch, flag, rsr, max_count = 256;
|
||||
|
||||
- status = readb(uap->port.membase + UART01x_FR);
|
||||
+ status = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
while (UART_RX_DATA(status) && max_count--) {
|
||||
- ch = readb(uap->port.membase + UART01x_DR);
|
||||
+ ch = __raw_readl(uap->port.membase + UART01x_DR);
|
||||
flag = TTY_NORMAL;
|
||||
|
||||
uap->port.icount.rx++;
|
||||
@@ -132,9 +131,9 @@ 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 = __raw_readl(uap->port.membase + UART01x_RSR) | UART_DUMMY_RSR_RX;
|
||||
if (unlikely(rsr & UART01x_RSR_ANY)) {
|
||||
- writel(0, uap->port.membase + UART01x_ECR);
|
||||
+ __raw_writel(0, uap->port.membase + UART01x_ECR);
|
||||
|
||||
if (rsr & UART01x_RSR_BE) {
|
||||
rsr &= ~(UART01x_RSR_FE | UART01x_RSR_PE);
|
||||
@@ -164,7 +163,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 = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
}
|
||||
spin_unlock(&uap->port.lock);
|
||||
tty_flip_buffer_push(tty);
|
||||
@@ -177,7 +176,7 @@ static void pl010_tx_chars(struct uart_a
|
||||
int count;
|
||||
|
||||
if (uap->port.x_char) {
|
||||
- writel(uap->port.x_char, uap->port.membase + UART01x_DR);
|
||||
+ __raw_writel(uap->port.x_char, uap->port.membase + UART01x_DR);
|
||||
uap->port.icount.tx++;
|
||||
uap->port.x_char = 0;
|
||||
return;
|
||||
@@ -189,7 +188,7 @@ static void pl010_tx_chars(struct uart_a
|
||||
|
||||
count = uap->port.fifosize >> 1;
|
||||
do {
|
||||
- writel(xmit->buf[xmit->tail], uap->port.membase + UART01x_DR);
|
||||
+ __raw_writel(xmit->buf[xmit->tail], uap->port.membase + UART01x_DR);
|
||||
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
|
||||
uap->port.icount.tx++;
|
||||
if (uart_circ_empty(xmit))
|
||||
@@ -207,9 +206,9 @@ static void pl010_modem_status(struct ua
|
||||
{
|
||||
unsigned int status, delta;
|
||||
|
||||
- writel(0, uap->port.membase + UART010_ICR);
|
||||
+ __raw_writel(0, uap->port.membase + UART010_ICR);
|
||||
|
||||
- status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
|
||||
+ status = __raw_readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
|
||||
|
||||
delta = status ^ uap->old_status;
|
||||
uap->old_status = status;
|
||||
@@ -237,7 +236,7 @@ static irqreturn_t pl010_int(int irq, vo
|
||||
|
||||
spin_lock(&uap->port.lock);
|
||||
|
||||
- status = readb(uap->port.membase + UART010_IIR);
|
||||
+ status = __raw_readl(uap->port.membase + UART010_IIR);
|
||||
if (status) {
|
||||
do {
|
||||
if (status & (UART010_IIR_RTIS | UART010_IIR_RIS))
|
||||
@@ -250,7 +249,7 @@ static irqreturn_t pl010_int(int irq, vo
|
||||
if (pass_counter-- == 0)
|
||||
break;
|
||||
|
||||
- status = readb(uap->port.membase + UART010_IIR);
|
||||
+ status = __raw_readl(uap->port.membase + UART010_IIR);
|
||||
} while (status & (UART010_IIR_RTIS | UART010_IIR_RIS |
|
||||
UART010_IIR_TIS));
|
||||
handled = 1;
|
||||
@@ -264,7 +263,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 = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
return status & UART01x_FR_BUSY ? 0 : TIOCSER_TEMT;
|
||||
}
|
||||
|
||||
@@ -274,7 +273,7 @@ static unsigned int pl010_get_mctrl(stru
|
||||
unsigned int result = 0;
|
||||
unsigned int status;
|
||||
|
||||
- status = readb(uap->port.membase + UART01x_FR);
|
||||
+ status = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
if (status & UART01x_FR_DCD)
|
||||
result |= TIOCM_CAR;
|
||||
if (status & UART01x_FR_DSR)
|
||||
@@ -300,12 +299,12 @@ 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 = __raw_readl(uap->port.membase + UART010_LCRH);
|
||||
if (break_state == -1)
|
||||
lcr_h |= UART01x_LCRH_BRK;
|
||||
else
|
||||
lcr_h &= ~UART01x_LCRH_BRK;
|
||||
- writel(lcr_h, uap->port.membase + UART010_LCRH);
|
||||
+ __raw_writel(lcr_h, uap->port.membase + UART010_LCRH);
|
||||
spin_unlock_irqrestore(&uap->port.lock, flags);
|
||||
}
|
||||
|
||||
@@ -333,12 +332,12 @@ 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 = __raw_readl(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY;
|
||||
|
||||
/*
|
||||
* Finally, enable interrupts
|
||||
*/
|
||||
- writel(UART01x_CR_UARTEN | UART010_CR_RIE | UART010_CR_RTIE,
|
||||
+ __raw_writel(UART01x_CR_UARTEN | UART010_CR_RIE | UART010_CR_RTIE,
|
||||
uap->port.membase + UART010_CR);
|
||||
|
||||
return 0;
|
||||
@@ -361,10 +360,10 @@ static void pl010_shutdown(struct uart_p
|
||||
/*
|
||||
* disable all interrupts, disable the port
|
||||
*/
|
||||
- writel(0, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(0, uap->port.membase + UART010_CR);
|
||||
|
||||
/* disable break condition and fifos */
|
||||
- writel(readb(uap->port.membase + UART010_LCRH) &
|
||||
+ __raw_writel(__raw_readl(uap->port.membase + UART010_LCRH) &
|
||||
~(UART01x_LCRH_BRK | UART01x_LCRH_FEN),
|
||||
uap->port.membase + UART010_LCRH);
|
||||
|
||||
@@ -386,7 +385,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) {
|
||||
@@ -449,25 +448,25 @@ 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 = __raw_readl(uap->port.membase + UART010_CR) & ~UART010_CR_MSIE;
|
||||
|
||||
if (UART_ENABLE_MS(port, termios->c_cflag))
|
||||
old_cr |= UART010_CR_MSIE;
|
||||
|
||||
- writel(0, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(0, uap->port.membase + UART010_CR);
|
||||
|
||||
/* Set baud rate */
|
||||
quot -= 1;
|
||||
- writel((quot & 0xf00) >> 8, uap->port.membase + UART010_LCRM);
|
||||
- writel(quot & 0xff, uap->port.membase + UART010_LCRL);
|
||||
+ __raw_writel((quot & 0xf00) >> 8, uap->port.membase + UART010_LCRM);
|
||||
+ __raw_writel(quot & 0xff, uap->port.membase + UART010_LCRL);
|
||||
|
||||
/*
|
||||
* ----------v----------v----------v----------v-----
|
||||
* NOTE: MUST BE WRITTEN AFTER UARTLCR_M & UARTLCR_L
|
||||
* ----------^----------^----------^----------^-----
|
||||
*/
|
||||
- writel(lcr_h, uap->port.membase + UART010_LCRH);
|
||||
- writel(old_cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(lcr_h, uap->port.membase + UART010_LCRH);
|
||||
+ __raw_writel(old_cr, uap->port.membase + UART010_CR);
|
||||
|
||||
spin_unlock_irqrestore(&uap->port.lock, flags);
|
||||
}
|
||||
@@ -554,7 +553,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
|
||||
|
||||
@@ -564,10 +563,10 @@ static void pl010_console_putchar(struct
|
||||
unsigned int status;
|
||||
|
||||
do {
|
||||
- status = readb(uap->port.membase + UART01x_FR);
|
||||
+ status = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
barrier();
|
||||
} while (!UART_TX_READY(status));
|
||||
- writel(ch, uap->port.membase + UART01x_DR);
|
||||
+ __raw_writel(ch, uap->port.membase + UART01x_DR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -581,8 +580,8 @@ pl010_console_write(struct console *co,
|
||||
/*
|
||||
* First save the CR then disable the interrupts
|
||||
*/
|
||||
- old_cr = readb(uap->port.membase + UART010_CR);
|
||||
- writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR);
|
||||
+ old_cr = __raw_readl(uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(UART01x_CR_UARTEN, uap->port.membase + UART010_CR);
|
||||
|
||||
uart_console_write(&uap->port, s, count, pl010_console_putchar);
|
||||
|
||||
@@ -591,10 +590,10 @@ pl010_console_write(struct console *co,
|
||||
* and restore the TCR
|
||||
*/
|
||||
do {
|
||||
- status = readb(uap->port.membase + UART01x_FR);
|
||||
+ status = __raw_readl(uap->port.membase + UART01x_FR);
|
||||
barrier();
|
||||
} while (status & UART01x_FR_BUSY);
|
||||
- writel(old_cr, uap->port.membase + UART010_CR);
|
||||
+ __raw_writel(old_cr, uap->port.membase + UART010_CR);
|
||||
|
||||
clk_disable(uap->clk);
|
||||
}
|
||||
@@ -603,9 +602,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 (__raw_readl(uap->port.membase + UART010_CR) & UART01x_CR_UARTEN) {
|
||||
unsigned int lcr_h, quot;
|
||||
- lcr_h = readb(uap->port.membase + UART010_LCRH);
|
||||
+ lcr_h = __raw_readl(uap->port.membase + UART010_LCRH);
|
||||
|
||||
*parity = 'n';
|
||||
if (lcr_h & UART01x_LCRH_PEN) {
|
||||
@@ -620,8 +619,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 = __raw_readl(uap->port.membase + UART010_LCRL) |
|
||||
+ __raw_readl(uap->port.membase + UART010_LCRM) << 8;
|
||||
*baud = uap->port.uartclk / (16 * (quot + 1));
|
||||
}
|
||||
}
|
||||
@@ -639,7 +638,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)
|
||||
@@ -657,7 +656,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,
|
||||
@@ -673,11 +672,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,
|
||||
};
|
||||
|
||||
--- a/drivers/serial/Kconfig
|
||||
+++ b/drivers/serial/Kconfig
|
||||
@@ -284,10 +284,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
|
|
@ -1,13 +0,0 @@
|
|||
--- a/drivers/amba/bus.c
|
||||
+++ b/drivers/amba/bus.c
|
||||
@@ -18,6 +18,10 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
+#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)
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
--- a/drivers/leds/leds-gpio.c
|
||||
+++ b/drivers/leds/leds-gpio.c
|
||||
@@ -45,13 +45,17 @@ static void gpio_led_set(struct led_clas
|
||||
container_of(led_cdev, struct gpio_led_data, cdev);
|
||||
int level;
|
||||
|
||||
- if (value == LED_OFF)
|
||||
- level = 0;
|
||||
- else
|
||||
- level = 1;
|
||||
-
|
||||
- if (led_dat->active_low)
|
||||
- level = !level;
|
||||
+ switch (value) {
|
||||
+ case LED_OFF:
|
||||
+ level = led_dat->active_low ? 1 : 0;
|
||||
+ break;
|
||||
+ case LED_FULL:
|
||||
+ level = led_dat->active_low ? 0 : 1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ level = value;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
/* Setting GPIOs with I2C/etc requires a task context, and we don't
|
||||
* seem to have a reliable way to know if we're already in one; so
|
|
@ -1,31 +0,0 @@
|
|||
--- a/drivers/watchdog/Kconfig
|
||||
+++ b/drivers/watchdog/Kconfig
|
||||
@@ -807,6 +807,18 @@ config RC32434_WDT
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called rc32434_wdt.
|
||||
|
||||
+config ADM5120_WDT
|
||||
+ tristate "Infineon ADM5120 SoC hardware watchdog"
|
||||
+ depends on WATCHDOG && ADM5120
|
||||
+ help
|
||||
+ This is a driver for hardware watchdog integrated in Infineon
|
||||
+ ADM5120 SoC. This watchdog simply watches your kernel to make sure
|
||||
+ it doesn't freeze, and if it does, it reboots your computer after a
|
||||
+ certain amount of time.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module will be
|
||||
+ called adm5120_wdt.
|
||||
+
|
||||
config INDYDOG
|
||||
tristate "Indy/I2 Hardware Watchdog"
|
||||
depends on SGI_HAS_INDYDOG
|
||||
--- a/drivers/watchdog/Makefile
|
||||
+++ b/drivers/watchdog/Makefile
|
||||
@@ -113,6 +113,7 @@ obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt
|
||||
obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
|
||||
obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
|
||||
obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
|
||||
+obj-$(CONFIG_ADM5120_WDT) += adm5120_wdt.o
|
||||
|
||||
# PARISC Architecture
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/usb/host/adm5120-dbg.c
|
||||
+++ b/drivers/usb/host/adm5120-dbg.c
|
||||
@@ -133,7 +133,7 @@ urb_print(struct admhcd *ahcd, struct ur
|
||||
|
||||
#define admhc_dbg_sw(ahcd, next, size, format, arg...) \
|
||||
do { \
|
||||
- if (next) { \
|
||||
+ if (next != NULL) { \
|
||||
unsigned s_len; \
|
||||
s_len = scnprintf(*next, *size, format, ## arg ); \
|
||||
*size -= s_len; *next += s_len; \
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/usb/host/adm5120-dbg.c
|
||||
+++ b/drivers/usb/host/adm5120-dbg.c
|
||||
@@ -642,7 +642,7 @@ static ssize_t fill_registers_buffer(str
|
||||
hcd->product_desc,
|
||||
hcd_name);
|
||||
|
||||
- if (bus->controller->power.power_state.event) {
|
||||
+ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
|
||||
size -= scnprintf(next, size,
|
||||
"SUSPENDED (no register access)\n");
|
||||
goto done;
|
|
@ -1,116 +0,0 @@
|
|||
--- a/drivers/usb/host/adm5120-dbg.c
|
||||
+++ b/drivers/usb/host/adm5120-dbg.c
|
||||
@@ -419,7 +419,7 @@ static struct dentry *admhc_debug_root;
|
||||
|
||||
struct debug_buffer {
|
||||
ssize_t (*fill_func)(struct debug_buffer *); /* fill method */
|
||||
- struct device *dev;
|
||||
+ struct admhcd *ahcd;
|
||||
struct mutex mutex; /* protect filling of buffer */
|
||||
size_t count; /* number of characters filled into buffer */
|
||||
char *page;
|
||||
@@ -494,15 +494,11 @@ show_list(struct admhcd *ahcd, char *buf
|
||||
|
||||
static ssize_t fill_async_buffer(struct debug_buffer *buf)
|
||||
{
|
||||
- struct usb_bus *bus;
|
||||
- struct usb_hcd *hcd;
|
||||
struct admhcd *ahcd;
|
||||
size_t temp;
|
||||
unsigned long flags;
|
||||
|
||||
- bus = dev_get_drvdata(buf->dev);
|
||||
- hcd = bus_to_hcd(bus);
|
||||
- ahcd = hcd_to_admhcd(hcd);
|
||||
+ ahcd = buf->ahcd;
|
||||
|
||||
spin_lock_irqsave(&ahcd->lock, flags);
|
||||
temp = show_list(ahcd, buf->page, PAGE_SIZE, ahcd->ed_head);
|
||||
@@ -516,8 +512,6 @@ static ssize_t fill_async_buffer(struct
|
||||
|
||||
static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
|
||||
{
|
||||
- struct usb_bus *bus;
|
||||
- struct usb_hcd *hcd;
|
||||
struct admhcd *ahcd;
|
||||
struct ed **seen, *ed;
|
||||
unsigned long flags;
|
||||
@@ -529,9 +523,7 @@ static ssize_t fill_periodic_buffer(stru
|
||||
return 0;
|
||||
seen_count = 0;
|
||||
|
||||
- bus = dev_get_drvdata(buf->dev);
|
||||
- hcd = bus_to_hcd(bus);
|
||||
- ahcd = hcd_to_admhcd(hcd);
|
||||
+ ahcd = buf->ahcd;
|
||||
next = buf->page;
|
||||
size = PAGE_SIZE;
|
||||
|
||||
@@ -613,7 +605,6 @@ static ssize_t fill_periodic_buffer(stru
|
||||
|
||||
static ssize_t fill_registers_buffer(struct debug_buffer *buf)
|
||||
{
|
||||
- struct usb_bus *bus;
|
||||
struct usb_hcd *hcd;
|
||||
struct admhcd *ahcd;
|
||||
struct admhcd_regs __iomem *regs;
|
||||
@@ -622,9 +613,8 @@ static ssize_t fill_registers_buffer(str
|
||||
char *next;
|
||||
u32 rdata;
|
||||
|
||||
- bus = dev_get_drvdata(buf->dev);
|
||||
- hcd = bus_to_hcd(bus);
|
||||
- ahcd = hcd_to_admhcd(hcd);
|
||||
+ ahcd = buf->ahcd;
|
||||
+ hcd = admhcd_to_hcd(ahcd);
|
||||
regs = ahcd->regs;
|
||||
next = buf->page;
|
||||
size = PAGE_SIZE;
|
||||
@@ -689,7 +679,7 @@ done:
|
||||
}
|
||||
|
||||
|
||||
-static struct debug_buffer *alloc_buffer(struct device *dev,
|
||||
+static struct debug_buffer *alloc_buffer(struct admhcd *ahcd,
|
||||
ssize_t (*fill_func)(struct debug_buffer *))
|
||||
{
|
||||
struct debug_buffer *buf;
|
||||
@@ -697,7 +687,7 @@ static struct debug_buffer *alloc_buffer
|
||||
buf = kzalloc(sizeof(struct debug_buffer), GFP_KERNEL);
|
||||
|
||||
if (buf) {
|
||||
- buf->dev = dev;
|
||||
+ buf->ahcd = ahcd;
|
||||
buf->fill_func = fill_func;
|
||||
mutex_init(&buf->mutex);
|
||||
}
|
||||
@@ -790,26 +780,25 @@ static int debug_registers_open(struct i
|
||||
static inline void create_debug_files(struct admhcd *ahcd)
|
||||
{
|
||||
struct usb_bus *bus = &admhcd_to_hcd(ahcd)->self;
|
||||
- struct device *dev = bus->dev;
|
||||
|
||||
ahcd->debug_dir = debugfs_create_dir(bus->bus_name, admhc_debug_root);
|
||||
if (!ahcd->debug_dir)
|
||||
goto dir_error;
|
||||
|
||||
ahcd->debug_async = debugfs_create_file("async", S_IRUGO,
|
||||
- ahcd->debug_dir, dev,
|
||||
+ ahcd->debug_dir, ahcd,
|
||||
&debug_async_fops);
|
||||
if (!ahcd->debug_async)
|
||||
goto async_error;
|
||||
|
||||
ahcd->debug_periodic = debugfs_create_file("periodic", S_IRUGO,
|
||||
- ahcd->debug_dir, dev,
|
||||
+ ahcd->debug_dir, ahcd,
|
||||
&debug_periodic_fops);
|
||||
if (!ahcd->debug_periodic)
|
||||
goto periodic_error;
|
||||
|
||||
ahcd->debug_registers = debugfs_create_file("registers", S_IRUGO,
|
||||
- ahcd->debug_dir, dev,
|
||||
+ ahcd->debug_dir, ahcd,
|
||||
&debug_registers_fops);
|
||||
if (!ahcd->debug_registers)
|
||||
goto registers_error;
|
|
@ -1,264 +0,0 @@
|
|||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_ADM5120=y
|
||||
CONFIG_ADM5120_ENET=y
|
||||
CONFIG_ADM5120_MACH_5GXI=y
|
||||
CONFIG_ADM5120_MACH_P_334WT=y
|
||||
CONFIG_ADM5120_MACH_P_335=y
|
||||
# CONFIG_ADM5120_OEM_CELLVISION is not set
|
||||
# CONFIG_ADM5120_OEM_COMPEX is not set
|
||||
# CONFIG_ADM5120_OEM_EDIMAX is not set
|
||||
# CONFIG_ADM5120_OEM_INFINEON is not set
|
||||
# CONFIG_ADM5120_OEM_MIKROTIK is not set
|
||||
# CONFIG_ADM5120_OEM_MOTOROLA is not set
|
||||
CONFIG_ADM5120_OEM_OSBRIDGE=y
|
||||
CONFIG_ADM5120_OEM_ZYXEL=y
|
||||
CONFIG_ADM5120_SOC_BGA=y
|
||||
CONFIG_ADM5120_WDT=y
|
||||
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
CONFIG_ARCH_SUPPORTS_OPROFILE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_BRIDGE_IGMP_SNOOPING is not set
|
||||
# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
|
||||
# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_CEPH_FS is not set
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,jffs2"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
# CONFIG_CPU_CAVIUM_OCTEON is not set
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
# CONFIG_CPU_LITTLE_ENDIAN is not set
|
||||
# CONFIG_CPU_LOONGSON2E is not set
|
||||
# CONFIG_CPU_LOONGSON2F is not set
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R5500 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
# CONFIG_CRYSTALHD is not set
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
|
||||
# CONFIG_DEFAULT_SECURITY_SMACK is not set
|
||||
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_DT3155 is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_FIRMWARE_IN_KERNEL=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_ACL=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GPIOLIB=y
|
||||
# CONFIG_GPIO_IT8761E is not set
|
||||
# CONFIG_GPIO_PL061 is not set
|
||||
# CONFIG_GPIO_SCH is not set
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HID=m
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_HZ_100 is not set
|
||||
CONFIG_HZ_250=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_INLINE_READ_LOCK is not set
|
||||
# CONFIG_INLINE_READ_LOCK_BH is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_READ_TRYLOCK is not set
|
||||
CONFIG_INLINE_READ_UNLOCK=y
|
||||
# CONFIG_INLINE_READ_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_READ_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_BH is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
|
||||
CONFIG_INLINE_SPIN_UNLOCK=y
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_BH is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_WRITE_TRYLOCK is not set
|
||||
CONFIG_INLINE_WRITE_UNLOCK=y
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
CONFIG_INPUT=m
|
||||
# CONFIG_INPUT_GPIO_BUTTONS is not set
|
||||
# CONFIG_INPUT_YEALINK is not set
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_LEDS_TRIGGER_ADM5120_SWITCH=m
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_LOGFS is not set
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
# CONFIG_LPC_SCH is not set
|
||||
# CONFIG_MACH_ALCHEMY is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_LOONGSON is not set
|
||||
# CONFIG_MACH_TX39XX is not set
|
||||
# CONFIG_MACH_TX49XX is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
# CONFIG_MFD_TIMBERDALE is not set
|
||||
CONFIG_MII=m
|
||||
# CONFIG_MIKROTIK_RB532 is not set
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
CONFIG_MIPS_MACHINE=y
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MTD_ADM5120=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC=y
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_TRXSPLIT=y
|
||||
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
# CONFIG_NET_PCI is not set
|
||||
CONFIG_NLS=m
|
||||
CONFIG_NO_HZ=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
# CONFIG_NXP_STB220 is not set
|
||||
# CONFIG_NXP_STB225 is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_PMC_MSP is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_STB810 is not set
|
||||
# CONFIG_POWERTV is not set
|
||||
CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SCSI_MOD=y
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_AMBA_PL010=y
|
||||
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
|
||||
CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
|
||||
CONFIG_SERIAL_AMBA_PL010_PORTNAME="ttyS"
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
# CONFIG_SERIAL_TIMBERDALE is not set
|
||||
CONFIG_SERIO=y
|
||||
# CONFIG_SERIO_ALTERA_PS2 is not set
|
||||
# CONFIG_SERIO_AMBAKMI is not set
|
||||
# CONFIG_SERIO_I8042 is not set
|
||||
# CONFIG_SERIO_LIBPS2 is not set
|
||||
# CONFIG_SERIO_PCIPS2 is not set
|
||||
# CONFIG_SERIO_RAW is not set
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
# 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_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_TREE_PREEMPT_RCU is not set
|
||||
CONFIG_USB=m
|
||||
CONFIG_USB_ADM5120_HCD=m
|
||||
CONFIG_USB_DEBUG=y
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
|
||||
CONFIG_USB_OHCI_HCD=m
|
||||
CONFIG_USB_SUPPORT=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
|
@ -1,317 +0,0 @@
|
|||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_ADM5120=y
|
||||
CONFIG_ADM5120_ENET=y
|
||||
CONFIG_ADM5120_MACH_5GXI=y
|
||||
CONFIG_ADM5120_MACH_BR_6104K=y
|
||||
CONFIG_ADM5120_MACH_BR_6104KP=y
|
||||
CONFIG_ADM5120_MACH_BR_61X4WG=y
|
||||
CONFIG_ADM5120_MACH_CAS_771=y
|
||||
CONFIG_ADM5120_MACH_EASY5120P_ATA=y
|
||||
CONFIG_ADM5120_MACH_EASY5120_RT=y
|
||||
CONFIG_ADM5120_MACH_EASY5120_WVOIP=y
|
||||
CONFIG_ADM5120_MACH_EASY83000=y
|
||||
CONFIG_ADM5120_MACH_EB_214A=y
|
||||
CONFIG_ADM5120_MACH_NFS_101=y
|
||||
CONFIG_ADM5120_MACH_NP27G=y
|
||||
CONFIG_ADM5120_MACH_NP28G=y
|
||||
CONFIG_ADM5120_MACH_PMUGW=y
|
||||
CONFIG_ADM5120_MACH_RB_11X=y
|
||||
CONFIG_ADM5120_MACH_RB_133=y
|
||||
CONFIG_ADM5120_MACH_RB_133C=y
|
||||
CONFIG_ADM5120_MACH_RB_150=y
|
||||
CONFIG_ADM5120_MACH_RB_153=y
|
||||
CONFIG_ADM5120_MACH_RB_192=y
|
||||
CONFIG_ADM5120_MACH_WP54=y
|
||||
CONFIG_ADM5120_OEM_CELLVISION=y
|
||||
CONFIG_ADM5120_OEM_COMPEX=y
|
||||
CONFIG_ADM5120_OEM_EDIMAX=y
|
||||
CONFIG_ADM5120_OEM_GENERIC=y
|
||||
CONFIG_ADM5120_OEM_INFINEON=y
|
||||
CONFIG_ADM5120_OEM_MIKROTIK=y
|
||||
CONFIG_ADM5120_OEM_MOTOROLA=y
|
||||
CONFIG_ADM5120_OEM_OSBRIDGE=y
|
||||
# CONFIG_ADM5120_OEM_ZYXEL is not set
|
||||
CONFIG_ADM5120_SOC_BGA=y
|
||||
CONFIG_ADM5120_WDT=y
|
||||
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
CONFIG_ARCH_SUPPORTS_OPROFILE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ATA=m
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_BRIDGE_IGMP_SNOOPING is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
|
||||
# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_CEPH_FS is not set
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,yaffs2,jffs2"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
# CONFIG_CPU_CAVIUM_OCTEON is not set
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
# CONFIG_CPU_LOONGSON2E is not set
|
||||
# CONFIG_CPU_LOONGSON2F is not set
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R5500 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AES=m
|
||||
CONFIG_CRYPTO_ARC4=m
|
||||
CONFIG_CRYPTO_BLKCIPHER=m
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_HASH=m
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_MANAGER=m
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
# CONFIG_CRYSTALHD is not set
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
|
||||
# CONFIG_DEFAULT_SECURITY_SMACK is not set
|
||||
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_DT3155 is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_FIRMWARE_IN_KERNEL=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_ACL=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GPIOLIB=y
|
||||
# CONFIG_GPIO_IT8761E is not set
|
||||
# CONFIG_GPIO_PL061 is not set
|
||||
# CONFIG_GPIO_SCH is not set
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HID=m
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_HOSTAP_FIRMWARE=y
|
||||
# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
|
||||
CONFIG_HOSTAP_PCI=m
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_HZ_100 is not set
|
||||
CONFIG_HZ_250=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_INLINE_READ_LOCK is not set
|
||||
# CONFIG_INLINE_READ_LOCK_BH is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_READ_TRYLOCK is not set
|
||||
CONFIG_INLINE_READ_UNLOCK=y
|
||||
# CONFIG_INLINE_READ_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_READ_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_BH is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
|
||||
CONFIG_INLINE_SPIN_UNLOCK=y
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_BH is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_WRITE_TRYLOCK is not set
|
||||
CONFIG_INLINE_WRITE_UNLOCK=y
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
|
||||
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
CONFIG_INPUT=m
|
||||
# CONFIG_INPUT_GPIO_BUTTONS is not set
|
||||
# CONFIG_INPUT_YEALINK is not set
|
||||
CONFIG_IRQ_CPU=y
|
||||
# CONFIG_KSZ884X_PCI is not set
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_LEDS_TRIGGER_ADM5120_SWITCH=m
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
CONFIG_LIB80211=m
|
||||
CONFIG_LIB80211_CRYPT_CCMP=m
|
||||
CONFIG_LIB80211_CRYPT_TKIP=m
|
||||
CONFIG_LIB80211_CRYPT_WEP=m
|
||||
# CONFIG_LOGFS is not set
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
# CONFIG_LPC_SCH is not set
|
||||
# CONFIG_MACH_ALCHEMY is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_LOONGSON is not set
|
||||
# CONFIG_MACH_TX39XX is not set
|
||||
# CONFIG_MACH_TX49XX is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
# CONFIG_MFD_TIMBERDALE is not set
|
||||
CONFIG_MII=m
|
||||
# CONFIG_MIKROTIK_RB532 is not set
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
CONFIG_MIPS_MACHINE=y
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MTD_ADM5120=y
|
||||
CONFIG_MTD_CFI_FIXUP_MACRONIX_BOOTLOC=y
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_MYLOADER_PARTS=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_PLATFORM=y
|
||||
CONFIG_MTD_TRXSPLIT=y
|
||||
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NLS=m
|
||||
CONFIG_NO_HZ=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
# CONFIG_NXP_STB220 is not set
|
||||
# CONFIG_NXP_STB225 is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PATA_RB153_CF=m
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_PMC_MSP is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_STB810 is not set
|
||||
# CONFIG_POWERTV is not set
|
||||
CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
CONFIG_SCSI=m
|
||||
CONFIG_SCSI_MOD=m
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_AMBA_PL010=y
|
||||
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
|
||||
CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
|
||||
CONFIG_SERIAL_AMBA_PL010_PORTNAME="ttyS"
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
# CONFIG_SERIAL_TIMBERDALE is not set
|
||||
CONFIG_SERIO=y
|
||||
# CONFIG_SERIO_ALTERA_PS2 is not set
|
||||
# CONFIG_SERIO_AMBAKMI is not set
|
||||
# CONFIG_SERIO_I8042 is not set
|
||||
# CONFIG_SERIO_LIBPS2 is not set
|
||||
# CONFIG_SERIO_PCIPS2 is not set
|
||||
# CONFIG_SERIO_RAW is not set
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
# 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_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
# CONFIG_TC35815 is not set
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_TREE_PREEMPT_RCU is not set
|
||||
CONFIG_USB=m
|
||||
CONFIG_USB_ADM5120_HCD=m
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
|
||||
CONFIG_USB_OHCI_HCD=m
|
||||
CONFIG_USB_SUPPORT=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_YAFFS_9BYTE_TAGS=y
|
||||
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
|
||||
CONFIG_YAFFS_AUTO_YAFFS2=y
|
||||
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
|
||||
# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
|
||||
CONFIG_YAFFS_FS=y
|
||||
CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
|
||||
CONFIG_YAFFS_YAFFS1=y
|
||||
CONFIG_YAFFS_YAFFS2=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
|
@ -1,180 +0,0 @@
|
|||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
CONFIG_ARCH_SUPPORTS_OPROFILE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
# CONFIG_ARPD is not set
|
||||
CONFIG_B44=y
|
||||
CONFIG_B44_PCI=y
|
||||
CONFIG_B44_PCICORE_AUTOSELECT=y
|
||||
CONFIG_B44_PCI_AUTOSELECT=y
|
||||
CONFIG_BCM47XX=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
# CONFIG_BCM63XX is not set
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_BUG is not set
|
||||
# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
|
||||
# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CFE=y
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
# CONFIG_CPU_CAVIUM_OCTEON is not set
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
# CONFIG_CPU_LOONGSON2E is not set
|
||||
# CONFIG_CPU_LOONGSON2F is not set
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R5500 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_FSNOTIFY is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_HZ_100 is not set
|
||||
CONFIG_HZ_250=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IP_ROUTE_VERBOSE is not set
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
# CONFIG_MACH_ALCHEMY is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_LOONGSON is not set
|
||||
# CONFIG_MACH_TX39XX is not set
|
||||
# CONFIG_MACH_TX49XX is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
# CONFIG_MIKROTIK_RB532 is not set
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MACHINE is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
CONFIG_MTD_BCM47XX=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NO_HZ=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
# CONFIG_NXP_STB220 is not set
|
||||
# CONFIG_NXP_STB225 is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PMC_MSP is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_STB810 is not set
|
||||
# CONFIG_POWERTV is not set
|
||||
# CONFIG_PROC_KCORE is not set
|
||||
CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SCSI_MOD=y
|
||||
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
# CONFIG_SERIAL_8250_MANY_PORTS is not set
|
||||
# CONFIG_SERIAL_8250_RSA is not set
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
# 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_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
CONFIG_SSB=y
|
||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
CONFIG_SSB_BLOCKIO=y
|
||||
CONFIG_SSB_DEBUG=y
|
||||
CONFIG_SSB_DRIVER_EXTIF=y
|
||||
CONFIG_SSB_DRIVER_GIGE=y
|
||||
CONFIG_SSB_DRIVER_MIPS=y
|
||||
CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
|
||||
CONFIG_SSB_EMBEDDED=y
|
||||
CONFIG_SSB_PCICORE_HOSTMODE=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
CONFIG_SSB_PCIHOST_POSSIBLE=y
|
||||
CONFIG_SSB_SERIAL=y
|
||||
CONFIG_SSB_SPROM=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
# CONFIG_TC35815 is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
|
@ -1,254 +0,0 @@
|
|||
commit 121915c4ee0812a14bc8d752bc210d0238d755c1
|
||||
Author: Waldemar Brodkorb <mips@waldemar-brodkorb.de>
|
||||
Date: Tue Jun 8 19:06:01 2010 +0200
|
||||
|
||||
MIPS: BCM47xx: Add NVRAM support devices
|
||||
|
||||
When trying to netboot a Linksys WRT54GS WLAN router, the bootup fails,
|
||||
because of following error message:
|
||||
|
||||
...
|
||||
[ 0.424000] b44: b44.c:v2.0
|
||||
[ 0.424000] b44: Invalid MAC address found in EEPROM
|
||||
[ 0.432000] b44 ssb0:1: Problem fetching invariants of chip,aborting
|
||||
[ 0.436000] b44: probe of ssb0:1 failed with error -22
|
||||
...
|
||||
|
||||
The router uses a CFE bootloader, but most of the needed environment
|
||||
variables for network card initialization, are not available from CFE
|
||||
via printenv and even though not via cfe_getenv().
|
||||
The required environment variables are saved in a special partition
|
||||
in flash memory. The attached patch implement nvram_getenv and enables
|
||||
bootup via NFS root on my router.
|
||||
|
||||
Most of the patch is extracted from the OpenWrt subversion repository and
|
||||
stripped down and cleaned up to just fix this issue.
|
||||
|
||||
[Ralf: sorted out header file inclusions. Lots of unneded headers and such
|
||||
that should have been included.]
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Reviewed-by: Phil Sutter <phil@nwl.cc>
|
||||
To: linux-mips@linux-mips.org
|
||||
Cc: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Patchwork: http://patchwork.linux-mips.org/patch/1359/
|
||||
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
--- a/arch/mips/bcm47xx/Makefile
|
||||
+++ b/arch/mips/bcm47xx/Makefile
|
||||
@@ -3,4 +3,4 @@
|
||||
# under Linux.
|
||||
#
|
||||
|
||||
-obj-y := gpio.o irq.o prom.o serial.o setup.o time.o wgt634u.o
|
||||
+obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o wgt634u.o
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/bcm47xx/nvram.c
|
||||
@@ -0,0 +1,94 @@
|
||||
+/*
|
||||
+ * BCM947xx nvram variable access
|
||||
+ *
|
||||
+ * Copyright (C) 2005 Broadcom Corporation
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/ssb/ssb.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <asm/addrspace.h>
|
||||
+#include <asm/mach-bcm47xx/nvram.h>
|
||||
+#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
+
|
||||
+static char nvram_buf[NVRAM_SPACE];
|
||||
+
|
||||
+/* Probe for NVRAM header */
|
||||
+static void __init early_nvram_init(void)
|
||||
+{
|
||||
+ struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
|
||||
+ struct nvram_header *header;
|
||||
+ int i;
|
||||
+ u32 base, lim, off;
|
||||
+ u32 *src, *dst;
|
||||
+
|
||||
+ base = mcore->flash_window;
|
||||
+ lim = mcore->flash_window_size;
|
||||
+
|
||||
+ off = FLASH_MIN;
|
||||
+ while (off <= lim) {
|
||||
+ /* Windowed flash access */
|
||||
+ header = (struct nvram_header *)
|
||||
+ KSEG1ADDR(base + off - NVRAM_SPACE);
|
||||
+ if (header->magic == NVRAM_HEADER)
|
||||
+ goto found;
|
||||
+ off <<= 1;
|
||||
+ }
|
||||
+
|
||||
+ /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
|
||||
+ header = (struct nvram_header *) KSEG1ADDR(base + 4096);
|
||||
+ if (header->magic == NVRAM_HEADER)
|
||||
+ goto found;
|
||||
+
|
||||
+ header = (struct nvram_header *) KSEG1ADDR(base + 1024);
|
||||
+ if (header->magic == NVRAM_HEADER)
|
||||
+ goto found;
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+found:
|
||||
+ src = (u32 *) header;
|
||||
+ dst = (u32 *) nvram_buf;
|
||||
+ for (i = 0; i < sizeof(struct nvram_header); i += 4)
|
||||
+ *dst++ = *src++;
|
||||
+ for (; i < header->len && i < NVRAM_SPACE; i += 4)
|
||||
+ *dst++ = le32_to_cpu(*src++);
|
||||
+}
|
||||
+
|
||||
+int nvram_getenv(char *name, char *val, size_t val_len)
|
||||
+{
|
||||
+ char *var, *value, *end, *eq;
|
||||
+
|
||||
+ if (!name)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (!nvram_buf[0])
|
||||
+ early_nvram_init();
|
||||
+
|
||||
+ /* Look for name=value and return value */
|
||||
+ var = &nvram_buf[sizeof(struct nvram_header)];
|
||||
+ end = nvram_buf + sizeof(nvram_buf) - 2;
|
||||
+ end[0] = end[1] = '\0';
|
||||
+ for (; *var; var = value + strlen(value) + 1) {
|
||||
+ eq = strchr(var, '=');
|
||||
+ if (!eq)
|
||||
+ break;
|
||||
+ value = eq + 1;
|
||||
+ if ((eq - var) == strlen(name) &&
|
||||
+ strncmp(var, name, (eq - var)) == 0) {
|
||||
+ snprintf(val, val_len, "%s", value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+EXPORT_SYMBOL(nvram_getenv);
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org>
|
||||
- * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
|
||||
* Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
||||
* Copyright (C) 2006 Michael Buesch <mb@bu3sch.de>
|
||||
+ * Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.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
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <asm/time.h>
|
||||
#include <bcm47xx.h>
|
||||
#include <asm/fw/cfe/cfe_api.h>
|
||||
+#include <asm/mach-bcm47xx/nvram.h>
|
||||
|
||||
struct ssb_bus ssb_bcm47xx;
|
||||
EXPORT_SYMBOL(ssb_bcm47xx);
|
||||
@@ -81,28 +82,42 @@ static int bcm47xx_get_invariants(struct
|
||||
/* Fill boardinfo structure */
|
||||
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
|
||||
|
||||
- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0)
|
||||
+ if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
|
||||
iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
||||
- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
||||
+ if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
||||
iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
||||
- if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0)
|
||||
+ if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
|
||||
iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
|
||||
|
||||
/* Fill sprom structure */
|
||||
memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
|
||||
iv->sprom.revision = 3;
|
||||
|
||||
- if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
|
||||
+ if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
|
||||
str2eaddr(buf, iv->sprom.et0mac);
|
||||
- if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
|
||||
+
|
||||
+ if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
|
||||
str2eaddr(buf, iv->sprom.et1mac);
|
||||
- if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
- if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
- if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
|
||||
+
|
||||
+ if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
|
||||
+ iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
|
||||
+
|
||||
+ if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
|
||||
+ iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
|
||||
+
|
||||
+ if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
||||
- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
||||
+
|
||||
+ if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 ||
|
||||
+ nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
||||
|
||||
return 0;
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||
@@ -0,0 +1,36 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005, Broadcom Corporation
|
||||
+ * Copyright (C) 2006, Felix Fietkau <nbd@openwrt.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.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __NVRAM_H
|
||||
+#define __NVRAM_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+struct nvram_header {
|
||||
+ u32 magic;
|
||||
+ u32 len;
|
||||
+ u32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:31 sdram_init */
|
||||
+ u32 config_refresh; /* 0:15 sdram_config, 16:31 sdram_refresh */
|
||||
+ u32 config_ncdl; /* ncdl values for memc */
|
||||
+};
|
||||
+
|
||||
+#define NVRAM_HEADER 0x48534C46 /* 'FLSH' */
|
||||
+#define NVRAM_VERSION 1
|
||||
+#define NVRAM_HEADER_SIZE 20
|
||||
+#define NVRAM_SPACE 0x8000
|
||||
+
|
||||
+#define FLASH_MIN 0x00020000 /* Minimum flash size */
|
||||
+
|
||||
+#define NVRAM_MAX_VALUE_LEN 255
|
||||
+#define NVRAM_MAX_PARAM_LEN 64
|
||||
+
|
||||
+extern int nvram_getenv(char *name, char *val, size_t val_len);
|
||||
+
|
||||
+#endif
|
|
@ -1,66 +0,0 @@
|
|||
From f65eb52ea6c0ec939fd44e74b6b873e0b549e3c9 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 12:49:41 +0200
|
||||
Subject: [PATCH 1/6] MIPS: BCM47xx: Really fix 128MB RAM problem
|
||||
|
||||
The previews patch 84a6fcb368a080620d12fc4d79e07902dbee7335 was wrong,
|
||||
I got wrong success reports.
|
||||
|
||||
The bcm47xx architecture maps the ram into a 128MB address space. It
|
||||
will be paced there as often as goes into the 128MB. The detection
|
||||
tries to find the position where the same memory is found. When reading
|
||||
over 128MB the processor will throw an exception. If 128MB ram is
|
||||
installed, it will not find the same memory because it tries to read
|
||||
over the 128MB boarder. Now it just assumes 128MB installed ram if it
|
||||
can not find that the ram is repeating.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/bcm47xx/prom.c | 22 ++++++++++++++--------
|
||||
1 files changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/mips/bcm47xx/prom.c
|
||||
+++ b/arch/mips/bcm47xx/prom.c
|
||||
@@ -126,6 +126,7 @@ static __init void prom_init_cmdline(voi
|
||||
static __init void prom_init_mem(void)
|
||||
{
|
||||
unsigned long mem;
|
||||
+ unsigned long max;
|
||||
|
||||
/* Figure out memory size by finding aliases.
|
||||
*
|
||||
@@ -134,21 +135,26 @@ static __init void prom_init_mem(void)
|
||||
* want to reuse the memory used by CFE (around 4MB). That means cfe_*
|
||||
* functions stop to work at some point during the boot, we should only
|
||||
* call them at the beginning of the boot.
|
||||
+ *
|
||||
+ * BCM47XX uses 128MB for addressing the ram, if the system contains
|
||||
+ * less that that amount of ram it remaps the ram more often into the
|
||||
+ * available space.
|
||||
+ * Accessing memory after 128MB will cause an exception.
|
||||
+ * max contains the biggest possible address supported by the platform.
|
||||
+ * If the method wants to try something above we assume 128MB ram.
|
||||
*/
|
||||
+ max = ((unsigned long)(prom_init) | ((128 << 20) - 1));
|
||||
for (mem = (1 << 20); mem < (128 << 20); mem += (1 << 20)) {
|
||||
+ if (((unsigned long)(prom_init) + mem) > max) {
|
||||
+ mem = (128 << 20);
|
||||
+ printk(KERN_DEBUG "assume 128MB RAM\n");
|
||||
+ break;
|
||||
+ }
|
||||
if (*(unsigned long *)((unsigned long)(prom_init) + mem) ==
|
||||
*(unsigned long *)(prom_init))
|
||||
break;
|
||||
}
|
||||
|
||||
- /* Ignoring the last page when ddr size is 128M. Cached
|
||||
- * accesses to last page is causing the processor to prefetch
|
||||
- * using address above 128M stepping out of the ddr address
|
||||
- * space.
|
||||
- */
|
||||
- if (mem == 0x8000000)
|
||||
- mem -= 0x1000;
|
||||
-
|
||||
add_memory_region(0, mem, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
From e5c5828063a55a752e2392d820383dd7a5da3737 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 13:34:32 +0200
|
||||
Subject: [PATCH 2/6] MIPS: BCM47xx: Fill values for b43 into ssb sprom
|
||||
|
||||
Most of the values are stored in the nvram and not in the CFE. At first
|
||||
the nvram should be read and if there is no value it should look into
|
||||
the CFE. Now more values are read out because the b43 and b43legacy
|
||||
drivers needs them.
|
||||
|
||||
Some parts of this patch have been in OpenWRT for a long time and were
|
||||
made by Michael Buesch.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/bcm47xx/setup.c | 131 +++++++++++++++++++++++++++++++++-----------
|
||||
1 files changed, 98 insertions(+), 33 deletions(-)
|
||||
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -74,6 +74,95 @@ static void str2eaddr(char *str, char *d
|
||||
}
|
||||
}
|
||||
|
||||
+#define READ_FROM_NVRAM(_outvar, name, buf) \
|
||||
+ if (nvram_getenv(name, buf, sizeof(buf)) >= 0 || \
|
||||
+ cfe_getenv(name, buf, sizeof(buf)) >= 0) \
|
||||
+ sprom->_outvar = simple_strtoul(buf, NULL, 0);
|
||||
+
|
||||
+static void bcm47xx_fill_sprom(struct ssb_sprom *sprom)
|
||||
+{
|
||||
+ char buf[100];
|
||||
+ u32 boardflags;
|
||||
+
|
||||
+ memset(sprom, 0, sizeof(struct ssb_sprom));
|
||||
+
|
||||
+ sprom->revision = 1; /* Fallback: Old hardware does not define this. */
|
||||
+ READ_FROM_NVRAM(revision, "sromrev", buf);
|
||||
+ if (nvram_getenv("il0macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("il0macaddr", buf, sizeof(buf)) >= 0)
|
||||
+ str2eaddr(buf, sprom->il0mac);
|
||||
+ if (nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
|
||||
+ str2eaddr(buf, sprom->et0mac);
|
||||
+ if (nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
|
||||
+ str2eaddr(buf, sprom->et1mac);
|
||||
+ READ_FROM_NVRAM(et0phyaddr, "et0phyaddr", buf);
|
||||
+ READ_FROM_NVRAM(et1phyaddr, "et1phyaddr", buf);
|
||||
+ READ_FROM_NVRAM(et0mdcport, "et0mdcport", buf);
|
||||
+ READ_FROM_NVRAM(et1mdcport, "et1mdcport", buf);
|
||||
+ READ_FROM_NVRAM(board_rev, "boardrev", buf);
|
||||
+ READ_FROM_NVRAM(country_code, "ccode", buf);
|
||||
+ READ_FROM_NVRAM(ant_available_a, "aa5g", buf);
|
||||
+ READ_FROM_NVRAM(ant_available_bg, "aa2g", buf);
|
||||
+ READ_FROM_NVRAM(pa0b0, "pa0b0", buf);
|
||||
+ READ_FROM_NVRAM(pa0b1, "pa0b1", buf);
|
||||
+ READ_FROM_NVRAM(pa0b2, "pa0b2", buf);
|
||||
+ READ_FROM_NVRAM(pa1b0, "pa1b0", buf);
|
||||
+ READ_FROM_NVRAM(pa1b1, "pa1b1", buf);
|
||||
+ READ_FROM_NVRAM(pa1b2, "pa1b2", buf);
|
||||
+ READ_FROM_NVRAM(pa1lob0, "pa1lob0", buf);
|
||||
+ READ_FROM_NVRAM(pa1lob2, "pa1lob1", buf);
|
||||
+ READ_FROM_NVRAM(pa1lob1, "pa1lob2", buf);
|
||||
+ READ_FROM_NVRAM(pa1hib0, "pa1hib0", buf);
|
||||
+ READ_FROM_NVRAM(pa1hib2, "pa1hib1", buf);
|
||||
+ READ_FROM_NVRAM(pa1hib1, "pa1hib2", buf);
|
||||
+ READ_FROM_NVRAM(gpio0, "wl0gpio0", buf);
|
||||
+ READ_FROM_NVRAM(gpio1, "wl0gpio1", buf);
|
||||
+ READ_FROM_NVRAM(gpio2, "wl0gpio2", buf);
|
||||
+ READ_FROM_NVRAM(gpio3, "wl0gpio3", buf);
|
||||
+ READ_FROM_NVRAM(maxpwr_bg, "pa0maxpwr", buf);
|
||||
+ READ_FROM_NVRAM(maxpwr_al, "pa1lomaxpwr", buf);
|
||||
+ READ_FROM_NVRAM(maxpwr_a, "pa1maxpwr", buf);
|
||||
+ READ_FROM_NVRAM(maxpwr_ah, "pa1himaxpwr", buf);
|
||||
+ READ_FROM_NVRAM(itssi_a, "pa1itssit", buf);
|
||||
+ READ_FROM_NVRAM(itssi_bg, "pa0itssit", buf);
|
||||
+ READ_FROM_NVRAM(tri2g, "tri2g", buf);
|
||||
+ READ_FROM_NVRAM(tri5gl, "tri5gl", buf);
|
||||
+ READ_FROM_NVRAM(tri5g, "tri5g", buf);
|
||||
+ READ_FROM_NVRAM(tri5gh, "tri5gh", buf);
|
||||
+ READ_FROM_NVRAM(rxpo2g, "rxpo2g", buf);
|
||||
+ READ_FROM_NVRAM(rxpo5g, "rxpo5g", buf);
|
||||
+ READ_FROM_NVRAM(rssisav2g, "rssisav2g", buf);
|
||||
+ READ_FROM_NVRAM(rssismc2g, "rssismc2g", buf);
|
||||
+ READ_FROM_NVRAM(rssismf2g, "rssismf2g", buf);
|
||||
+ READ_FROM_NVRAM(bxa2g, "bxa2g", buf);
|
||||
+ READ_FROM_NVRAM(rssisav5g, "rssisav5g", buf);
|
||||
+ READ_FROM_NVRAM(rssismc5g, "rssismc5g", buf);
|
||||
+ READ_FROM_NVRAM(rssismf5g, "rssismf5g", buf);
|
||||
+ READ_FROM_NVRAM(bxa5g, "bxa5g", buf);
|
||||
+ READ_FROM_NVRAM(cck2gpo, "cck2gpo", buf);
|
||||
+ READ_FROM_NVRAM(ofdm2gpo, "ofdm2gpo", buf);
|
||||
+ READ_FROM_NVRAM(ofdm5glpo, "ofdm5glpo", buf);
|
||||
+ READ_FROM_NVRAM(ofdm5gpo, "ofdm5gpo", buf);
|
||||
+ READ_FROM_NVRAM(ofdm5ghpo, "ofdm5ghpo", buf);
|
||||
+
|
||||
+ if (nvram_getenv("boardflags", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("boardflags", buf, sizeof(buf)) >= 0)
|
||||
+ boardflags = simple_strtoul(buf, NULL, 0);
|
||||
+ if (boardflags) {
|
||||
+ sprom->boardflags_lo = (boardflags & 0x0000FFFFU);
|
||||
+ sprom->boardflags_hi = (boardflags & 0xFFFF0000U) >> 16;
|
||||
+ }
|
||||
+ if (nvram_getenv("boardflags2", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("boardflags2", buf, sizeof(buf)) >= 0)
|
||||
+ boardflags = simple_strtoul(buf, NULL, 0);
|
||||
+ if (boardflags) {
|
||||
+ sprom->boardflags2_lo = (boardflags & 0x0000FFFFU);
|
||||
+ sprom->boardflags2_hi = (boardflags & 0xFFFF0000U) >> 16;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int bcm47xx_get_invariants(struct ssb_bus *bus,
|
||||
struct ssb_init_invariants *iv)
|
||||
{
|
||||
@@ -82,43 +171,19 @@ static int bcm47xx_get_invariants(struct
|
||||
/* Fill boardinfo structure */
|
||||
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
|
||||
|
||||
- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
|
||||
+ iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
|
||||
+ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
||||
iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
||||
- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
||||
- iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
||||
- if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
|
||||
+ if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("boardrev", buf, sizeof(buf)) >= 0)
|
||||
iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
|
||||
|
||||
- /* Fill sprom structure */
|
||||
- memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
|
||||
- iv->sprom.revision = 3;
|
||||
-
|
||||
- if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
|
||||
- str2eaddr(buf, iv->sprom.et0mac);
|
||||
-
|
||||
- if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
|
||||
- str2eaddr(buf, iv->sprom.et1mac);
|
||||
-
|
||||
- if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
|
||||
-
|
||||
- if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
|
||||
-
|
||||
- if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
||||
-
|
||||
- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 ||
|
||||
- nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
||||
- iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
||||
+ bcm47xx_fill_sprom(&iv->sprom);
|
||||
+
|
||||
+ if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("cardbus", buf, sizeof(buf)) >= 0)
|
||||
+ iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
From e0039e622e53a22b14fce4d2f0cb3febc75cd58b Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 13:58:09 +0200
|
||||
Subject: [PATCH 3/6] MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by default
|
||||
|
||||
The b43_pci_bridge is needed to use the b43 driver with brcm47xx.
|
||||
Activate it by default if pci is available.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/Kconfig | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -62,6 +62,7 @@ config BCM47XX
|
||||
select SSB_DRIVER_MIPS
|
||||
select SSB_DRIVER_EXTIF
|
||||
select SSB_EMBEDDED
|
||||
+ select SSB_B43_PCI_BRIDGE if PCI
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
select GENERIC_GPIO
|
||||
select SYS_HAS_EARLY_PRINTK
|
|
@ -1,75 +0,0 @@
|
|||
From 9be402f069cc259ad5795b77567d66c4e7f6bef6 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 14:59:24 +0200
|
||||
Subject: [PATCH 4/6] MIPS: BCM47xx: Setup and register serial early
|
||||
|
||||
Swap the first and second serial if console=ttyS1 was set.
|
||||
Set it up and register it for early serial support.
|
||||
|
||||
This patch has been in OpenWRT for a long time.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/bcm47xx/setup.c | 39 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 38 insertions(+), 1 deletions(-)
|
||||
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <linux/ssb/ssb_embedded.h>
|
||||
+#include <linux/serial.h>
|
||||
+#include <linux/serial_8250.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/time.h>
|
||||
@@ -190,12 +192,47 @@ static int bcm47xx_get_invariants(struct
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
- int err;
|
||||
+ int i, err;
|
||||
+ char buf[100];
|
||||
+ struct ssb_mipscore *mcore;
|
||||
|
||||
err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE,
|
||||
bcm47xx_get_invariants);
|
||||
if (err)
|
||||
panic("Failed to initialize SSB bus (err %d)\n", err);
|
||||
+ mcore = &ssb_bcm47xx.mipscore;
|
||||
+
|
||||
+ if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0 ||
|
||||
+ cfe_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
|
||||
+ if (strstr(buf, "console=ttyS1")) {
|
||||
+ struct ssb_serial_port port;
|
||||
+
|
||||
+ printk(KERN_DEBUG "Swapping serial ports!\n");
|
||||
+ /* swap serial ports */
|
||||
+ memcpy(&port, &mcore->serial_ports[0], sizeof(port));
|
||||
+ memcpy(&mcore->serial_ports[0], &mcore->serial_ports[1],
|
||||
+ sizeof(port));
|
||||
+ memcpy(&mcore->serial_ports[1], &port, sizeof(port));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < mcore->nr_serial_ports; i++) {
|
||||
+ struct ssb_serial_port *port = &(mcore->serial_ports[i]);
|
||||
+ struct uart_port s;
|
||||
+
|
||||
+ memset(&s, 0, sizeof(s));
|
||||
+ s.line = i;
|
||||
+ s.mapbase = (unsigned int) port->regs;
|
||||
+ s.membase = port->regs;
|
||||
+ s.irq = port->irq + 2;
|
||||
+ s.uartclk = port->baud_base;
|
||||
+ s.flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
|
||||
+ s.iotype = SERIAL_IO_MEM;
|
||||
+ s.regshift = port->reg_shift;
|
||||
+
|
||||
+ early_serial_setup(&s);
|
||||
+ }
|
||||
+ printk(KERN_DEBUG "Serial init done.\n");
|
||||
|
||||
_machine_restart = bcm47xx_machine_restart;
|
||||
_machine_halt = bcm47xx_machine_halt;
|
|
@ -1,47 +0,0 @@
|
|||
From ff7295cc37b1e4b31aed9f071374f43aa128329b Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Fri, 30 Jul 2010 17:45:20 +0200
|
||||
Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value.
|
||||
|
||||
nvram_getenv should behave like cfe_getenv. For now it is used like
|
||||
cfe_getenv. cfe_getenv returns 0 on success and -1 in case of an error.
|
||||
Change nvram_getenv to do the same.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/bcm47xx/nvram.c | 4 ++--
|
||||
arch/mips/include/asm/mach-bcm47xx/nvram.h | 3 +++
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/mips/bcm47xx/nvram.c
|
||||
+++ b/arch/mips/bcm47xx/nvram.c
|
||||
@@ -69,7 +69,7 @@ int nvram_getenv(char *name, char *val,
|
||||
char *var, *value, *end, *eq;
|
||||
|
||||
if (!name)
|
||||
- return 1;
|
||||
+ return NVRAM_ERR_INV_PARAM;
|
||||
|
||||
if (!nvram_buf[0])
|
||||
early_nvram_init();
|
||||
@@ -89,6 +89,6 @@ int nvram_getenv(char *name, char *val,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
- return 1;
|
||||
+ return NVRAM_ERR_ENVNOTFOUND;
|
||||
}
|
||||
EXPORT_SYMBOL(nvram_getenv);
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||
@@ -31,6 +31,10 @@ struct nvram_header {
|
||||
#define NVRAM_MAX_VALUE_LEN 255
|
||||
#define NVRAM_MAX_PARAM_LEN 64
|
||||
|
||||
+// TODO: replace by old values. This chaueses that the system will not try to look into the cfe.
|
||||
+#define NVRAM_ERR_INV_PARAM 1 // -8
|
||||
+#define NVRAM_ERR_ENVNOTFOUND 1 // -9
|
||||
+
|
||||
extern int nvram_getenv(char *name, char *val, size_t val_len);
|
||||
|
||||
#endif
|
|
@ -1,141 +0,0 @@
|
|||
From 5219981646071abb6731634bf47781a53e248764 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 15:11:26 +0200
|
||||
Subject: [PATCH 6/6] MIPS: BCM47xx: Remove CFE console
|
||||
|
||||
Do not use the CFE console. It causes hangs on some devices like the
|
||||
Buffalo WHR-HP-G54.
|
||||
This was reported in https://dev.openwrt.org/ticket/4061 and
|
||||
https://forum.openwrt.org/viewtopic.php?id=17063
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/Kconfig | 1 -
|
||||
arch/mips/bcm47xx/prom.c | 82 +++------------------------------------------
|
||||
2 files changed, 6 insertions(+), 77 deletions(-)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -65,7 +65,6 @@ config BCM47XX
|
||||
select SSB_B43_PCI_BRIDGE if PCI
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
select GENERIC_GPIO
|
||||
- select SYS_HAS_EARLY_PRINTK
|
||||
select CFE
|
||||
help
|
||||
Support for BCM47XX based boards
|
||||
--- a/arch/mips/bcm47xx/prom.c
|
||||
+++ b/arch/mips/bcm47xx/prom.c
|
||||
@@ -31,96 +31,28 @@
|
||||
#include <asm/fw/cfe/cfe_api.h>
|
||||
#include <asm/fw/cfe/cfe_error.h>
|
||||
|
||||
-static int cfe_cons_handle;
|
||||
-
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "Broadcom BCM47XX";
|
||||
}
|
||||
|
||||
-void prom_putchar(char c)
|
||||
-{
|
||||
- while (cfe_write(cfe_cons_handle, &c, 1) == 0)
|
||||
- ;
|
||||
-}
|
||||
-
|
||||
-static __init void prom_init_cfe(void)
|
||||
+static __init int prom_init_cfe(void)
|
||||
{
|
||||
uint32_t cfe_ept;
|
||||
uint32_t cfe_handle;
|
||||
uint32_t cfe_eptseal;
|
||||
- int argc = fw_arg0;
|
||||
- char **envp = (char **) fw_arg2;
|
||||
- int *prom_vec = (int *) fw_arg3;
|
||||
-
|
||||
- /*
|
||||
- * Check if a loader was used; if NOT, the 4 arguments are
|
||||
- * what CFE gives us (handle, 0, EPT and EPTSEAL)
|
||||
- */
|
||||
- if (argc < 0) {
|
||||
- cfe_handle = (uint32_t)argc;
|
||||
- cfe_ept = (uint32_t)envp;
|
||||
- cfe_eptseal = (uint32_t)prom_vec;
|
||||
- } else {
|
||||
- if ((int)prom_vec < 0) {
|
||||
- /*
|
||||
- * Old loader; all it gives us is the handle,
|
||||
- * so use the "known" entrypoint and assume
|
||||
- * the seal.
|
||||
- */
|
||||
- cfe_handle = (uint32_t)prom_vec;
|
||||
- cfe_ept = 0xBFC00500;
|
||||
- cfe_eptseal = CFE_EPTSEAL;
|
||||
- } else {
|
||||
- /*
|
||||
- * Newer loaders bundle the handle/ept/eptseal
|
||||
- * Note: prom_vec is in the loader's useg
|
||||
- * which is still alive in the TLB.
|
||||
- */
|
||||
- cfe_handle = prom_vec[0];
|
||||
- cfe_ept = prom_vec[2];
|
||||
- cfe_eptseal = prom_vec[3];
|
||||
- }
|
||||
- }
|
||||
+
|
||||
+ cfe_eptseal = (uint32_t) fw_arg3;
|
||||
+ cfe_handle = (uint32_t) fw_arg0;
|
||||
+ cfe_ept = (uint32_t) fw_arg2;
|
||||
|
||||
if (cfe_eptseal != CFE_EPTSEAL) {
|
||||
- /* too early for panic to do any good */
|
||||
printk(KERN_ERR "CFE's entrypoint seal doesn't match.");
|
||||
- while (1) ;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
cfe_init(cfe_handle, cfe_ept);
|
||||
-}
|
||||
-
|
||||
-static __init void prom_init_console(void)
|
||||
-{
|
||||
- /* Initialize CFE console */
|
||||
- cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
|
||||
-}
|
||||
-
|
||||
-static __init void prom_init_cmdline(void)
|
||||
-{
|
||||
- static char buf[COMMAND_LINE_SIZE] __initdata;
|
||||
-
|
||||
- /* Get the kernel command line from CFE */
|
||||
- if (cfe_getenv("LINUX_CMDLINE", buf, COMMAND_LINE_SIZE) >= 0) {
|
||||
- buf[COMMAND_LINE_SIZE - 1] = 0;
|
||||
- strcpy(arcs_cmdline, buf);
|
||||
- }
|
||||
-
|
||||
- /* Force a console handover by adding a console= argument if needed,
|
||||
- * as CFE is not available anymore later in the boot process. */
|
||||
- if ((strstr(arcs_cmdline, "console=")) == NULL) {
|
||||
- /* Try to read the default serial port used by CFE */
|
||||
- if ((cfe_getenv("BOOT_CONSOLE", buf, COMMAND_LINE_SIZE) < 0)
|
||||
- || (strncmp("uart", buf, 4)))
|
||||
- /* Default to uart0 */
|
||||
- strcpy(buf, "uart0");
|
||||
-
|
||||
- /* Compute the new command line */
|
||||
- snprintf(arcs_cmdline, COMMAND_LINE_SIZE, "%s console=ttyS%c,115200",
|
||||
- arcs_cmdline, buf[4]);
|
||||
- }
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static __init void prom_init_mem(void)
|
||||
@@ -161,8 +93,6 @@ static __init void prom_init_mem(void)
|
||||
void __init prom_init(void)
|
||||
{
|
||||
prom_init_cfe();
|
||||
- prom_init_console();
|
||||
- prom_init_cmdline();
|
||||
prom_init_mem();
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
From ca00adabb88dd1194891624836d7574aab2d7c05 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 21:25:03 +0200
|
||||
Subject: [PATCH 1/2] USB: Add USB 2.0 to ssb ohci driver
|
||||
|
||||
This adds USB 2.0 support to ssb ohci driver.
|
||||
This patch was used in OpenWRT for a long time now.
|
||||
|
||||
CC: Steve Brown <sbrown@cortland.com>
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
drivers/usb/host/ohci-ssb.c | 52 ++++++++++++++++++++++++++++++++++++++++--
|
||||
1 files changed, 49 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/ohci-ssb.c
|
||||
+++ b/drivers/usb/host/ohci-ssb.c
|
||||
@@ -93,8 +93,11 @@ static void ssb_ohci_detach(struct ssb_d
|
||||
{
|
||||
struct usb_hcd *hcd = ssb_get_drvdata(dev);
|
||||
|
||||
+ if (hcd->driver->shutdown)
|
||||
+ hcd->driver->shutdown(hcd);
|
||||
usb_remove_hcd(hcd);
|
||||
iounmap(hcd->regs);
|
||||
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
|
||||
usb_put_hcd(hcd);
|
||||
ssb_device_disable(dev, 0);
|
||||
}
|
||||
@@ -106,10 +109,52 @@ static int ssb_ohci_attach(struct ssb_de
|
||||
int err = -ENOMEM;
|
||||
u32 tmp, flags = 0;
|
||||
|
||||
- if (dev->id.coreid == SSB_DEV_USB11_HOSTDEV)
|
||||
- flags |= SSB_OHCI_TMSLOW_HOSTMODE;
|
||||
+ if (dma_set_mask(dev->dma_dev, DMA_BIT_MASK(32)) ||
|
||||
+ dma_set_coherent_mask(dev->dma_dev, DMA_BIT_MASK(32)))
|
||||
+ return -EOPNOTSUPP;
|
||||
|
||||
- ssb_device_enable(dev, flags);
|
||||
+ if (dev->id.coreid == SSB_DEV_USB11_HOSTDEV) {
|
||||
+ /* Put the device into host-mode. */
|
||||
+ flags |= SSB_OHCI_TMSLOW_HOSTMODE;
|
||||
+ ssb_device_enable(dev, flags);
|
||||
+ } else if (dev->id.coreid == SSB_DEV_USB20_HOST) {
|
||||
+ /*
|
||||
+ * USB 2.0 special considerations:
|
||||
+ *
|
||||
+ * In addition to the standard SSB reset sequence, the Host
|
||||
+ * Control Register must be programmed to bring the USB core
|
||||
+ * and various phy components out of reset.
|
||||
+ */
|
||||
+ ssb_device_enable(dev, 0);
|
||||
+ ssb_write32(dev, 0x200, 0x7ff);
|
||||
+
|
||||
+ /* Change Flush control reg */
|
||||
+ tmp = ssb_read32(dev, 0x400);
|
||||
+ tmp &= ~8;
|
||||
+ ssb_write32(dev, 0x400, tmp);
|
||||
+ tmp = ssb_read32(dev, 0x400);
|
||||
+
|
||||
+ /* Change Shim control reg */
|
||||
+ tmp = ssb_read32(dev, 0x304);
|
||||
+ tmp &= ~0x100;
|
||||
+ ssb_write32(dev, 0x304, tmp);
|
||||
+ tmp = ssb_read32(dev, 0x304);
|
||||
+
|
||||
+ udelay(1);
|
||||
+
|
||||
+ /* Work around for 5354 failures */
|
||||
+ if (dev->id.revision == 2 && dev->bus->chip_id == 0x5354) {
|
||||
+ /* Change syn01 reg */
|
||||
+ tmp = 0x00fe00fe;
|
||||
+ ssb_write32(dev, 0x894, tmp);
|
||||
+
|
||||
+ /* Change syn03 reg */
|
||||
+ tmp = ssb_read32(dev, 0x89c);
|
||||
+ tmp |= 0x1;
|
||||
+ ssb_write32(dev, 0x89c, tmp);
|
||||
+ }
|
||||
+ } else
|
||||
+ ssb_device_enable(dev, 0);
|
||||
|
||||
hcd = usb_create_hcd(&ssb_ohci_hc_driver, dev->dev,
|
||||
dev_name(dev->dev));
|
||||
@@ -200,6 +245,7 @@ static int ssb_ohci_resume(struct ssb_de
|
||||
static const struct ssb_device_id ssb_ohci_table[] = {
|
||||
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB11_HOSTDEV, SSB_ANY_REV),
|
||||
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB11_HOST, SSB_ANY_REV),
|
||||
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB20_HOST, SSB_ANY_REV),
|
||||
SSB_DEVTABLE_END
|
||||
};
|
||||
MODULE_DEVICE_TABLE(ssb, ssb_ohci_table);
|
|
@ -1,345 +0,0 @@
|
|||
From ad224c0d5fa0fc05f8aaef3c19fc9b4eb275a5d2 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Jul 2010 21:29:40 +0200
|
||||
Subject: [PATCH 2/2] USB: Add ehci ssb driver
|
||||
|
||||
Support for the Sonics Silicon Backplane (SSB) attached Broadcom USB EHCI core.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
drivers/usb/host/Kconfig | 13 ++
|
||||
drivers/usb/host/ehci-hcd.c | 22 ++++-
|
||||
drivers/usb/host/ehci-ssb.c | 255 +++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 288 insertions(+), 2 deletions(-)
|
||||
create mode 100644 drivers/usb/host/ehci-ssb.c
|
||||
|
||||
--- a/drivers/usb/host/Kconfig
|
||||
+++ b/drivers/usb/host/Kconfig
|
||||
@@ -150,6 +150,19 @@ config USB_OXU210HP_HCD
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called oxu210hp-hcd.
|
||||
|
||||
+config USB_EHCI_HCD_SSB
|
||||
+ bool "EHCI support for Broadcom SSB EHCI core"
|
||||
+ depends on USB_EHCI_HCD && (SSB = y || SSB = USB_EHCI_HCD) && EXPERIMENTAL
|
||||
+ default n
|
||||
+ ---help---
|
||||
+ Support for the Sonics Silicon Backplane (SSB) attached
|
||||
+ Broadcom USB EHCI core.
|
||||
+
|
||||
+ This device is present in some embedded devices with
|
||||
+ Broadcom based SSB bus.
|
||||
+
|
||||
+ If unsure, say N.
|
||||
+
|
||||
config USB_ISP116X_HCD
|
||||
tristate "ISP116X HCD support"
|
||||
depends on USB
|
||||
--- a/drivers/usb/host/ehci-hcd.c
|
||||
+++ b/drivers/usb/host/ehci-hcd.c
|
||||
@@ -1159,8 +1159,14 @@ MODULE_LICENSE ("GPL");
|
||||
#define PLATFORM_DRIVER ehci_atmel_driver
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_USB_EHCI_HCD_SSB
|
||||
+#include "ehci-ssb.c"
|
||||
+#define SSB_EHCI_DRIVER ssb_ehci_driver
|
||||
+#endif
|
||||
+
|
||||
#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
|
||||
- !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER)
|
||||
+ !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
|
||||
+ !defined(SSB_EHCI_DRIVER)
|
||||
#error "missing bus glue for ehci-hcd"
|
||||
#endif
|
||||
|
||||
@@ -1214,10 +1220,20 @@ static int __init ehci_hcd_init(void)
|
||||
if (retval < 0)
|
||||
goto clean3;
|
||||
#endif
|
||||
+
|
||||
+#ifdef SSB_EHCI_DRIVER
|
||||
+ retval = ssb_driver_register(&SSB_EHCI_DRIVER);
|
||||
+ if (retval < 0)
|
||||
+ goto clean4;
|
||||
+#endif
|
||||
return retval;
|
||||
|
||||
+#ifdef SSB_EHCI_DRIVER
|
||||
+ /* ssb_driver_unregister(&SSB_EHCI_DRIVER); */
|
||||
+clean4:
|
||||
+#endif
|
||||
#ifdef OF_PLATFORM_DRIVER
|
||||
- /* of_unregister_platform_driver(&OF_PLATFORM_DRIVER); */
|
||||
+ of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
|
||||
clean3:
|
||||
#endif
|
||||
#ifdef PS3_SYSTEM_BUS_DRIVER
|
||||
@@ -1244,6 +1260,9 @@ module_init(ehci_hcd_init);
|
||||
|
||||
static void __exit ehci_hcd_cleanup(void)
|
||||
{
|
||||
+#ifdef SSB_EHCI_DRIVER
|
||||
+ ssb_driver_unregister(&SSB_EHCI_DRIVER);
|
||||
+#endif
|
||||
#ifdef OF_PLATFORM_DRIVER
|
||||
of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
|
||||
#endif
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/ehci-ssb.c
|
||||
@@ -0,0 +1,255 @@
|
||||
+/*
|
||||
+ * Sonics Silicon Backplane
|
||||
+ * Broadcom USB-core EHCI driver (SSB bus glue)
|
||||
+ *
|
||||
+ * Copyright 2007 Steven Brown <sbrown@cortland.com>
|
||||
+ * Copyright 2010 Hauke Mehrtens <hauke@hauke-m.de>
|
||||
+ *
|
||||
+ * Derived from the OHCI-SSB driver
|
||||
+ * Copyright 2007 Michael Buesch <mb@bu3sch.de>
|
||||
+ *
|
||||
+ * Derived from the EHCI-PCI driver
|
||||
+ * Copyright (c) 2000-2004 by David Brownell
|
||||
+ *
|
||||
+ * Derived from the OHCI-PCI driver
|
||||
+ * Copyright 1999 Roman Weissgaerber
|
||||
+ * Copyright 2000-2002 David Brownell
|
||||
+ * Copyright 1999 Linus Torvalds
|
||||
+ * Copyright 1999 Gregory P. Smith
|
||||
+ *
|
||||
+ * Derived from the USBcore related parts of Broadcom-SB
|
||||
+ * Copyright 2005 Broadcom Corporation
|
||||
+ *
|
||||
+ * Licensed under the GNU/GPL. See COPYING for details.
|
||||
+ */
|
||||
+#include <linux/ssb/ssb.h>
|
||||
+
|
||||
+
|
||||
+struct ssb_ehci_device {
|
||||
+ struct ehci_hcd ehci; /* _must_ be at the beginning. */
|
||||
+};
|
||||
+
|
||||
+static inline
|
||||
+struct ssb_ehci_device *hcd_to_ssb_ehci(struct usb_hcd *hcd)
|
||||
+{
|
||||
+ return (struct ssb_ehci_device *)(hcd->hcd_priv);
|
||||
+}
|
||||
+
|
||||
+static int ssb_ehci_reset(struct usb_hcd *hcd)
|
||||
+{
|
||||
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
||||
+ int err;
|
||||
+
|
||||
+ ehci->caps = hcd->regs;
|
||||
+ ehci->regs = hcd->regs +
|
||||
+ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
|
||||
+
|
||||
+ dbg_hcs_params(ehci, "reset");
|
||||
+ dbg_hcc_params(ehci, "reset");
|
||||
+
|
||||
+ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
|
||||
+
|
||||
+ err = ehci_halt(ehci);
|
||||
+
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ err = ehci_init(hcd);
|
||||
+
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ ehci_reset(ehci);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static const struct hc_driver ssb_ehci_hc_driver = {
|
||||
+ .description = "ssb-usb-ehci",
|
||||
+ .product_desc = "SSB EHCI Controller",
|
||||
+ .hcd_priv_size = sizeof(struct ssb_ehci_device),
|
||||
+
|
||||
+ .irq = ehci_irq,
|
||||
+ .flags = HCD_MEMORY | HCD_USB2,
|
||||
+
|
||||
+ .reset = ssb_ehci_reset,
|
||||
+ .start = ehci_run,
|
||||
+ .stop = ehci_stop,
|
||||
+ .shutdown = ehci_shutdown,
|
||||
+
|
||||
+ .urb_enqueue = ehci_urb_enqueue,
|
||||
+ .urb_dequeue = ehci_urb_dequeue,
|
||||
+ .endpoint_disable = ehci_endpoint_disable,
|
||||
+ .endpoint_reset = ehci_endpoint_reset,
|
||||
+
|
||||
+ .get_frame_number = ehci_get_frame,
|
||||
+
|
||||
+ .hub_status_data = ehci_hub_status_data,
|
||||
+ .hub_control = ehci_hub_control,
|
||||
+#if defined(CONFIG_PM)
|
||||
+ .bus_suspend = ehci_bus_suspend,
|
||||
+ .bus_resume = ehci_bus_resume,
|
||||
+#endif
|
||||
+ .relinquish_port = ehci_relinquish_port,
|
||||
+ .port_handed_over = ehci_port_handed_over,
|
||||
+
|
||||
+ .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
|
||||
+};
|
||||
+
|
||||
+static void ssb_ehci_detach(struct ssb_device *dev)
|
||||
+{
|
||||
+ struct usb_hcd *hcd = ssb_get_drvdata(dev);
|
||||
+
|
||||
+ if (hcd->driver->shutdown)
|
||||
+ hcd->driver->shutdown(hcd);
|
||||
+ usb_remove_hcd(hcd);
|
||||
+ iounmap(hcd->regs);
|
||||
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
|
||||
+ usb_put_hcd(hcd);
|
||||
+ ssb_device_disable(dev, 0);
|
||||
+}
|
||||
+
|
||||
+static int ssb_ehci_attach(struct ssb_device *dev)
|
||||
+{
|
||||
+ struct ssb_ehci_device *ehcidev;
|
||||
+ struct usb_hcd *hcd;
|
||||
+ int err = -ENOMEM;
|
||||
+ u32 tmp;
|
||||
+
|
||||
+ if (dma_set_mask(dev->dma_dev, DMA_BIT_MASK(32)) ||
|
||||
+ dma_set_coherent_mask(dev->dma_dev, DMA_BIT_MASK(32)))
|
||||
+ return -EOPNOTSUPP;
|
||||
+
|
||||
+ /*
|
||||
+ * USB 2.0 special considerations:
|
||||
+ *
|
||||
+ * In addition to the standard SSB reset sequence, the Host Control
|
||||
+ * Register must be programmed to bring the USB core and various phy
|
||||
+ * components out of reset.
|
||||
+ */
|
||||
+ ssb_device_enable(dev, 0);
|
||||
+ ssb_write32(dev, 0x200, 0x7ff);
|
||||
+
|
||||
+ /* Change Flush control reg */
|
||||
+ tmp = ssb_read32(dev, 0x400);
|
||||
+ tmp &= ~8;
|
||||
+ ssb_write32(dev, 0x400, tmp);
|
||||
+ tmp = ssb_read32(dev, 0x400);
|
||||
+
|
||||
+ /* Change Shim control reg */
|
||||
+ tmp = ssb_read32(dev, 0x304);
|
||||
+ tmp &= ~0x100;
|
||||
+ ssb_write32(dev, 0x304, tmp);
|
||||
+ tmp = ssb_read32(dev, 0x304);
|
||||
+
|
||||
+ udelay(1);
|
||||
+
|
||||
+ /* Work around for 5354 failures */
|
||||
+ if (dev->id.revision == 2 && dev->bus->chip_id == 0x5354) {
|
||||
+ /* Change syn01 reg */
|
||||
+ tmp = 0x00fe00fe;
|
||||
+ ssb_write32(dev, 0x894, tmp);
|
||||
+
|
||||
+ /* Change syn03 reg */
|
||||
+ tmp = ssb_read32(dev, 0x89c);
|
||||
+ tmp |= 0x1;
|
||||
+ ssb_write32(dev, 0x89c, tmp);
|
||||
+ }
|
||||
+
|
||||
+ hcd = usb_create_hcd(&ssb_ehci_hc_driver, dev->dev,
|
||||
+ dev_name(dev->dev));
|
||||
+ if (!hcd)
|
||||
+ goto err_dev_disable;
|
||||
+
|
||||
+ ehcidev = hcd_to_ssb_ehci(hcd);
|
||||
+ tmp = ssb_read32(dev, SSB_ADMATCH0);
|
||||
+ hcd->rsrc_start = ssb_admatch_base(tmp) + 0x800; /* ehci core offset */
|
||||
+ hcd->rsrc_len = 0x100; /* ehci reg block size */
|
||||
+ /*
|
||||
+ * start & size modified per sbutils.c
|
||||
+ */
|
||||
+ hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
|
||||
+ if (!hcd->regs)
|
||||
+ goto err_put_hcd;
|
||||
+ err = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
|
||||
+ if (err)
|
||||
+ goto err_iounmap;
|
||||
+
|
||||
+ ssb_set_drvdata(dev, hcd);
|
||||
+
|
||||
+ return err;
|
||||
+
|
||||
+err_iounmap:
|
||||
+ iounmap(hcd->regs);
|
||||
+err_put_hcd:
|
||||
+ usb_put_hcd(hcd);
|
||||
+err_dev_disable:
|
||||
+ ssb_device_disable(dev, 0);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int ssb_ehci_probe(struct ssb_device *dev,
|
||||
+ const struct ssb_device_id *id)
|
||||
+{
|
||||
+ int err;
|
||||
+ u16 chipid_top;
|
||||
+
|
||||
+ /* USBcores are only connected on embedded devices. */
|
||||
+ chipid_top = (dev->bus->chip_id & 0xFF00);
|
||||
+ if (chipid_top != 0x4700 && chipid_top != 0x5300)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ /* TODO: Probably need checks here; is the core connected? */
|
||||
+
|
||||
+ if (usb_disabled())
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ err = ssb_ehci_attach(dev);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static void ssb_ehci_remove(struct ssb_device *dev)
|
||||
+{
|
||||
+ ssb_ehci_detach(dev);
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_PM
|
||||
+
|
||||
+static int ssb_ehci_suspend(struct ssb_device *dev, pm_message_t state)
|
||||
+{
|
||||
+ ssb_device_disable(dev, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ssb_ehci_resume(struct ssb_device *dev)
|
||||
+{
|
||||
+ struct usb_hcd *hcd = ssb_get_drvdata(dev);
|
||||
+ struct ssb_ehci_device *ehcidev = hcd_to_ssb_ehci(hcd);
|
||||
+
|
||||
+ ssb_device_enable(dev, 0);
|
||||
+
|
||||
+ ehci_finish_controller_resume(hcd);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#else /* !CONFIG_PM */
|
||||
+#define ssb_ehci_suspend NULL
|
||||
+#define ssb_ehci_resume NULL
|
||||
+#endif /* CONFIG_PM */
|
||||
+
|
||||
+static const struct ssb_device_id ssb_ehci_table[] = {
|
||||
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_USB20_HOST, SSB_ANY_REV),
|
||||
+ SSB_DEVTABLE_END
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(ssb, ssb_ehci_table);
|
||||
+
|
||||
+static struct ssb_driver ssb_ehci_driver = {
|
||||
+ .name = KBUILD_MODNAME,
|
||||
+ .id_table = ssb_ehci_table,
|
||||
+ .probe = ssb_ehci_probe,
|
||||
+ .remove = ssb_ehci_remove,
|
||||
+ .suspend = ssb_ehci_suspend,
|
||||
+ .resume = ssb_ehci_resume,
|
||||
+};
|
|
@ -1,25 +0,0 @@
|
|||
--- a/drivers/mtd/maps/Kconfig
|
||||
+++ b/drivers/mtd/maps/Kconfig
|
||||
@@ -319,6 +319,12 @@ config MTD_CFI_FLAGADM
|
||||
Mapping for the Flaga digital module. If you don't have one, ignore
|
||||
this setting.
|
||||
|
||||
+config MTD_BCM47XX
|
||||
+ tristate "BCM47xx flash device"
|
||||
+ depends on MIPS && MTD_CFI && BCM47XX
|
||||
+ help
|
||||
+ Support for the flash chips on the BCM947xx board.
|
||||
+
|
||||
config MTD_REDWOOD
|
||||
tristate "CFI Flash devices mapped on IBM Redwood"
|
||||
depends on MTD_CFI && ( REDWOOD_4 || REDWOOD_5 || REDWOOD_6 )
|
||||
--- a/drivers/mtd/maps/Makefile
|
||||
+++ b/drivers/mtd/maps/Makefile
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcms
|
||||
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
|
||||
obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o
|
||||
obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o
|
||||
+obj-$(CONFIG_MTD_BCM47XX) += bcm47xx-flash.o
|
||||
obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o
|
||||
obj-$(CONFIG_MTD_SBC_GXX) += sbc_gxx.o
|
||||
obj-$(CONFIG_MTD_SC520CDP) += sc520cdp.o
|
|
@ -1,367 +0,0 @@
|
|||
--- a/arch/mips/include/asm/r4kcache.h
|
||||
+++ b/arch/mips/include/asm/r4kcache.h
|
||||
@@ -17,6 +17,20 @@
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/mipsmtregs.h>
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+#include <asm/paccess.h>
|
||||
+#include <linux/ssb/ssb.h>
|
||||
+#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
||||
+
|
||||
+#define BCM4710_FILL_TLB(addr) (*(volatile unsigned long *)(addr))
|
||||
+#define BCM4710_PROTECTED_FILL_TLB(addr) ({ unsigned long x; get_dbe(x, (volatile unsigned long *)(addr)); })
|
||||
+#else
|
||||
+#define BCM4710_DUMMY_RREG()
|
||||
+
|
||||
+#define BCM4710_FILL_TLB(addr)
|
||||
+#define BCM4710_PROTECTED_FILL_TLB(addr)
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* This macro return a properly sign-extended address suitable as base address
|
||||
* for indexed cache operations. Two issues here:
|
||||
@@ -150,6 +164,7 @@ static inline void flush_icache_line_ind
|
||||
static inline void flush_dcache_line_indexed(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Index_Writeback_Inv_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -169,6 +184,7 @@ static inline void flush_icache_line(uns
|
||||
static inline void flush_dcache_line(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Hit_Writeback_Inv_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -176,6 +192,7 @@ static inline void flush_dcache_line(uns
|
||||
static inline void invalidate_dcache_line(unsigned long addr)
|
||||
{
|
||||
__dflush_prologue
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
cache_op(Hit_Invalidate_D, addr);
|
||||
__dflush_epilogue
|
||||
}
|
||||
@@ -208,6 +225,7 @@ static inline void flush_scache_line(uns
|
||||
*/
|
||||
static inline void protected_flush_icache_line(unsigned long addr)
|
||||
{
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
protected_cache_op(Hit_Invalidate_I, addr);
|
||||
}
|
||||
|
||||
@@ -219,6 +237,7 @@ static inline void protected_flush_icach
|
||||
*/
|
||||
static inline void protected_writeback_dcache_line(unsigned long addr)
|
||||
{
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
protected_cache_op(Hit_Writeback_Inv_D, addr);
|
||||
}
|
||||
|
||||
@@ -339,8 +358,52 @@ static inline void invalidate_tcache_pag
|
||||
: "r" (base), \
|
||||
"i" (op));
|
||||
|
||||
+static inline void blast_dcache(void)
|
||||
+{
|
||||
+ unsigned long start = KSEG0;
|
||||
+ unsigned long dcache_size = current_cpu_data.dcache.waysize * current_cpu_data.dcache.ways;
|
||||
+ unsigned long end = (start + dcache_size);
|
||||
+
|
||||
+ do {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Index_Writeback_Inv_D, start);
|
||||
+ start += current_cpu_data.dcache.linesz;
|
||||
+ } while(start < end);
|
||||
+}
|
||||
+
|
||||
+static inline void blast_dcache_page(unsigned long page)
|
||||
+{
|
||||
+ unsigned long start = page;
|
||||
+ unsigned long end = start + PAGE_SIZE;
|
||||
+
|
||||
+ BCM4710_FILL_TLB(start);
|
||||
+ do {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Hit_Writeback_Inv_D, start);
|
||||
+ start += current_cpu_data.dcache.linesz;
|
||||
+ } while(start < end);
|
||||
+}
|
||||
+
|
||||
+static inline void blast_dcache_page_indexed(unsigned long page)
|
||||
+{
|
||||
+ unsigned long start = page;
|
||||
+ unsigned long end = start + PAGE_SIZE;
|
||||
+ unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit;
|
||||
+ unsigned long ws_end = current_cpu_data.dcache.ways <<
|
||||
+ current_cpu_data.dcache.waybit;
|
||||
+ unsigned long ws, addr;
|
||||
+ for (ws = 0; ws < ws_end; ws += ws_inc) {
|
||||
+ start = page + ws;
|
||||
+ for (addr = start; addr < end; addr += current_cpu_data.dcache.linesz) {
|
||||
+ BCM4710_DUMMY_RREG();
|
||||
+ cache_op(Index_Writeback_Inv_D, addr);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */
|
||||
-#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize) \
|
||||
+#define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize, war) \
|
||||
static inline void blast_##pfx##cache##lsize(void) \
|
||||
{ \
|
||||
unsigned long start = INDEX_BASE; \
|
||||
@@ -352,6 +415,7 @@ static inline void blast_##pfx##cache##l
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
+ war \
|
||||
for (ws = 0; ws < ws_end; ws += ws_inc) \
|
||||
for (addr = start; addr < end; addr += lsize * 32) \
|
||||
cache##lsize##_unroll32(addr|ws, indexop); \
|
||||
@@ -366,6 +430,7 @@ static inline void blast_##pfx##cache##l
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
+ war \
|
||||
do { \
|
||||
cache##lsize##_unroll32(start, hitop); \
|
||||
start += lsize * 32; \
|
||||
@@ -384,6 +449,8 @@ static inline void blast_##pfx##cache##l
|
||||
current_cpu_data.desc.waybit; \
|
||||
unsigned long ws, addr; \
|
||||
\
|
||||
+ war \
|
||||
+ \
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
for (ws = 0; ws < ws_end; ws += ws_inc) \
|
||||
@@ -393,36 +460,38 @@ static inline void blast_##pfx##cache##l
|
||||
__##pfx##flush_epilogue \
|
||||
}
|
||||
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16)
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16)
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16)
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32)
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32)
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32)
|
||||
-__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64)
|
||||
-__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64)
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64)
|
||||
-__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128)
|
||||
-
|
||||
-__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16)
|
||||
-__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32)
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16)
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32)
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64)
|
||||
-__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128)
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16, )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16, BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16, )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32, )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32, )
|
||||
+__BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 64, )
|
||||
+__BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64, BCM4710_FILL_TLB(start);)
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64, )
|
||||
+__BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128, )
|
||||
+
|
||||
+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 16, )
|
||||
+__BUILD_BLAST_CACHE(inv_d, dcache, Index_Writeback_Inv_D, Hit_Invalidate_D, 32, )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 16, )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 32, )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 64, )
|
||||
+__BUILD_BLAST_CACHE(inv_s, scache, Index_Writeback_Inv_SD, Hit_Invalidate_SD, 128, )
|
||||
|
||||
/* build blast_xxx_range, protected_blast_xxx_range */
|
||||
-#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot) \
|
||||
+#define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot, war, war2) \
|
||||
static inline void prot##blast_##pfx##cache##_range(unsigned long start, \
|
||||
unsigned long end) \
|
||||
{ \
|
||||
unsigned long lsize = cpu_##desc##_line_size(); \
|
||||
unsigned long addr = start & ~(lsize - 1); \
|
||||
unsigned long aend = (end - 1) & ~(lsize - 1); \
|
||||
+ war \
|
||||
\
|
||||
__##pfx##flush_prologue \
|
||||
\
|
||||
while (1) { \
|
||||
+ war2 \
|
||||
prot##cache_op(hitop, addr); \
|
||||
if (addr == aend) \
|
||||
break; \
|
||||
@@ -432,13 +501,13 @@ static inline void prot##blast_##pfx##ca
|
||||
__##pfx##flush_epilogue \
|
||||
}
|
||||
|
||||
-__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_)
|
||||
-__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_)
|
||||
-__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_)
|
||||
-__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, )
|
||||
-__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_, BCM4710_PROTECTED_FILL_TLB(addr); BCM4710_PROTECTED_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_,, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_,, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D,, BCM4710_FILL_TLB(addr); BCM4710_FILL_TLB(aend);, BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD,,, )
|
||||
/* blast_inv_dcache_range */
|
||||
-__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, )
|
||||
-__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, )
|
||||
+__BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D,,,BCM4710_DUMMY_RREG();)
|
||||
+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD,,, )
|
||||
|
||||
#endif /* _ASM_R4KCACHE_H */
|
||||
--- a/arch/mips/include/asm/stackframe.h
|
||||
+++ b/arch/mips/include/asm/stackframe.h
|
||||
@@ -449,6 +449,10 @@
|
||||
.macro RESTORE_SP_AND_RET
|
||||
LONG_L sp, PT_R29(sp)
|
||||
.set mips3
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+ nop
|
||||
+#endif
|
||||
eret
|
||||
.set mips0
|
||||
.endm
|
||||
--- a/arch/mips/kernel/genex.S
|
||||
+++ b/arch/mips/kernel/genex.S
|
||||
@@ -52,6 +52,10 @@ NESTED(except_vec1_generic, 0, sp)
|
||||
NESTED(except_vec3_generic, 0, sp)
|
||||
.set push
|
||||
.set noat
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+ nop
|
||||
+#endif
|
||||
#if R5432_CP0_INTERRUPT_WAR
|
||||
mfc0 k0, CP0_INDEX
|
||||
#endif
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <asm/cacheflush.h> /* for run_uncached() */
|
||||
|
||||
|
||||
+/* For enabling BCM4710 cache workarounds */
|
||||
+int bcm4710 = 0;
|
||||
+
|
||||
/*
|
||||
* Special Variant of smp_call_function for use by cache functions:
|
||||
*
|
||||
@@ -111,6 +114,9 @@ static void __cpuinit r4k_blast_dcache_p
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page = blast_dcache_page;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -127,6 +133,9 @@ static void __cpuinit r4k_blast_dcache_p
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page_indexed = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -143,6 +152,9 @@ static void __cpuinit r4k_blast_dcache_s
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache = blast_dcache;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -680,6 +692,8 @@ static void local_r4k_flush_cache_sigtra
|
||||
unsigned long addr = (unsigned long) arg;
|
||||
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr);
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
|
||||
if (dc_lsize)
|
||||
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
|
||||
if (!cpu_icache_snoops_remote_store && scache_size)
|
||||
@@ -1311,6 +1325,17 @@ static void __cpuinit coherency_setup(vo
|
||||
* silly idea of putting something else there ...
|
||||
*/
|
||||
switch (current_cpu_type()) {
|
||||
+ case CPU_BCM3302:
|
||||
+ {
|
||||
+ u32 cm;
|
||||
+ cm = read_c0_diag();
|
||||
+ /* Enable icache */
|
||||
+ cm |= (1 << 31);
|
||||
+ /* Enable dcache */
|
||||
+ cm |= (1 << 30);
|
||||
+ write_c0_diag(cm);
|
||||
+ }
|
||||
+ break;
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
@@ -1367,6 +1392,15 @@ void __cpuinit r4k_cache_init(void)
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* Check if special workarounds are required */
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ if (current_cpu_data.cputype == CPU_BCM4710 && (current_cpu_data.processor_id & 0xff) == 0) {
|
||||
+ printk("Enabling BCM4710A0 cache workarounds.\n");
|
||||
+ bcm4710 = 1;
|
||||
+ } else
|
||||
+#endif
|
||||
+ bcm4710 = 0;
|
||||
+
|
||||
probe_pcache();
|
||||
setup_scache();
|
||||
|
||||
@@ -1425,5 +1459,13 @@ void __cpuinit r4k_cache_init(void)
|
||||
#if !defined(CONFIG_MIPS_CMP)
|
||||
local_r4k___flush_cache_all(NULL);
|
||||
#endif
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ {
|
||||
+ static void (*_coherency_setup)(void);
|
||||
+ _coherency_setup = (void (*)(void)) KSEG1ADDR(coherency_setup);
|
||||
+ _coherency_setup();
|
||||
+ }
|
||||
+#else
|
||||
coherency_setup();
|
||||
+#endif
|
||||
}
|
||||
--- a/arch/mips/mm/tlbex.c
|
||||
+++ b/arch/mips/mm/tlbex.c
|
||||
@@ -868,6 +868,9 @@ static void __cpuinit build_r4000_tlb_re
|
||||
/* No need for uasm_i_nop */
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(&p);
|
||||
+#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
|
||||
#else
|
||||
@@ -1318,6 +1321,9 @@ build_r4000_tlbchange_handler_head(u32 *
|
||||
struct uasm_reloc **r, unsigned int pte,
|
||||
unsigned int ptr)
|
||||
{
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(p, l, r, pte, ptr); /* get pmd in ptr */
|
||||
#else
|
|
@ -1,77 +0,0 @@
|
|||
--- a/arch/mips/include/asm/cpu-features.h
|
||||
+++ b/arch/mips/include/asm/cpu-features.h
|
||||
@@ -110,6 +110,9 @@
|
||||
#ifndef cpu_has_pindexed_dcache
|
||||
#define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX)
|
||||
#endif
|
||||
+#ifndef cpu_use_kmap_coherent
|
||||
+#define cpu_use_kmap_coherent 1
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* I-Cache snoops remote store. This only matters on SMP. Some multiprocessors
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/*
|
||||
+ * 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) 2005 Ralf Baechle (ralf@linux-mips.org)
|
||||
+ */
|
||||
+#ifndef __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H
|
||||
+#define __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H
|
||||
+
|
||||
+#define cpu_use_kmap_coherent 0
|
||||
+
|
||||
+#endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -507,7 +507,7 @@ static inline void local_r4k_flush_cache
|
||||
*/
|
||||
map_coherent = (cpu_has_dc_aliases &&
|
||||
page_mapped(page) && !Page_dcache_dirty(page));
|
||||
- if (map_coherent)
|
||||
+ if (map_coherent && cpu_use_kmap_coherent)
|
||||
vaddr = kmap_coherent(page, addr);
|
||||
else
|
||||
vaddr = kmap_atomic(page, KM_USER0);
|
||||
@@ -530,7 +530,7 @@ static inline void local_r4k_flush_cache
|
||||
}
|
||||
|
||||
if (vaddr) {
|
||||
- if (map_coherent)
|
||||
+ if (map_coherent && cpu_use_kmap_coherent)
|
||||
kunmap_coherent();
|
||||
else
|
||||
kunmap_atomic(vaddr, KM_USER0);
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -210,7 +210,7 @@ void copy_user_highpage(struct page *to,
|
||||
void *vfrom, *vto;
|
||||
|
||||
vto = kmap_atomic(to, KM_USER1);
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapped(from) && !Page_dcache_dirty(from)) {
|
||||
vfrom = kmap_coherent(from, vaddr);
|
||||
copy_page(vto, vfrom);
|
||||
@@ -232,7 +232,7 @@ void copy_to_user_page(struct vm_area_st
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapped(page) && !Page_dcache_dirty(page)) {
|
||||
void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(vto, src, len);
|
||||
@@ -250,7 +250,7 @@ void copy_from_user_page(struct vm_area_
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapped(page) && !Page_dcache_dirty(page)) {
|
||||
void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(dst, vfrom, len);
|
|
@ -1,92 +0,0 @@
|
|||
--- a/drivers/net/b44.c
|
||||
+++ b/drivers/net/b44.c
|
||||
@@ -381,11 +381,12 @@ static void b44_set_flow_ctrl(struct b44
|
||||
__b44_set_flow_ctrl(bp, pause_enab);
|
||||
}
|
||||
|
||||
-#ifdef SSB_DRIVER_MIPS
|
||||
-extern char *nvram_get(char *name);
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+
|
||||
+#include <asm/mach-bcm47xx/nvram.h>
|
||||
static void b44_wap54g10_workaround(struct b44 *bp)
|
||||
{
|
||||
- const char *str;
|
||||
+ char buf[20];
|
||||
u32 val;
|
||||
int err;
|
||||
|
||||
@@ -394,10 +395,9 @@ static void b44_wap54g10_workaround(stru
|
||||
* see https://dev.openwrt.org/ticket/146
|
||||
* check and reset bit "isolate"
|
||||
*/
|
||||
- str = nvram_get("boardnum");
|
||||
- if (!str)
|
||||
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) > 0)
|
||||
return;
|
||||
- if (simple_strtoul(str, NULL, 0) == 2) {
|
||||
+ if (simple_strtoul(buf, NULL, 0) == 2) {
|
||||
err = __b44_readphy(bp, 0, MII_BMCR, &val);
|
||||
if (err)
|
||||
goto error;
|
||||
@@ -412,10 +412,43 @@ static void b44_wap54g10_workaround(stru
|
||||
error:
|
||||
pr_warning("PHY: cannot reset MII transceiver isolate bit\n");
|
||||
}
|
||||
+
|
||||
+static inline int startswith (const char *source, const char *cmp)
|
||||
+{
|
||||
+ return !strncmp(source,cmp,strlen(cmp));
|
||||
+}
|
||||
+
|
||||
+static inline void b44_bcm47xx_workarounds(struct b44 *bp)
|
||||
+{
|
||||
+ char buf[20];
|
||||
+ /* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
|
||||
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) > 0)
|
||||
+ return;
|
||||
+ if (simple_strtoul(buf, NULL, 0) == 100) {
|
||||
+ bp->phy_addr = B44_PHY_ADDR_NO_PHY;
|
||||
+ } else {
|
||||
+ /* WL-HDD */
|
||||
+ struct ssb_device *sdev = bp->sdev;
|
||||
+ if (nvram_getenv("hardware_version", buf, sizeof(buf)) > 0)
|
||||
+ return;
|
||||
+ if (startswith(buf, "WL300-")) {
|
||||
+ if (sdev->bus->sprom.et0phyaddr == 0 &&
|
||||
+ sdev->bus->sprom.et1phyaddr == 1)
|
||||
+ bp->phy_addr = B44_PHY_ADDR_NO_PHY;
|
||||
+ }
|
||||
+ }
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
#else
|
||||
+
|
||||
static inline void b44_wap54g10_workaround(struct b44 *bp)
|
||||
{
|
||||
}
|
||||
+
|
||||
+static inline void b44_bcm47xx_workarounds(struct b44 *bp)
|
||||
+{
|
||||
+}
|
||||
#endif
|
||||
|
||||
static int b44_setup_phy(struct b44 *bp)
|
||||
@@ -424,6 +457,7 @@ static int b44_setup_phy(struct b44 *bp)
|
||||
int err;
|
||||
|
||||
b44_wap54g10_workaround(bp);
|
||||
+ b44_bcm47xx_workarounds(bp);
|
||||
|
||||
if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
|
||||
return 0;
|
||||
@@ -2080,6 +2114,8 @@ static int __devinit b44_get_invariants(
|
||||
* valid PHY address. */
|
||||
bp->phy_addr &= 0x1F;
|
||||
|
||||
+ b44_bcm47xx_workarounds(bp);
|
||||
+
|
||||
memcpy(bp->dev->dev_addr, addr, 6);
|
||||
|
||||
if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
|
|
@ -1,15 +0,0 @@
|
|||
--- a/drivers/net/b44.c
|
||||
+++ b/drivers/net/b44.c
|
||||
@@ -188,10 +188,11 @@ static int b44_wait_bit(struct b44 *bp,
|
||||
udelay(10);
|
||||
}
|
||||
if (i == timeout) {
|
||||
+#if 0
|
||||
if (net_ratelimit())
|
||||
netdev_err(bp->dev, "BUG! Timeout waiting for bit %08x of register %lx to %s\n",
|
||||
bit, reg, clear ? "clear" : "set");
|
||||
-
|
||||
+#endif
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
|
@ -1,42 +0,0 @@
|
|||
--- a/drivers/ssb/driver_chipcommon.c
|
||||
+++ b/drivers/ssb/driver_chipcommon.c
|
||||
@@ -285,6 +285,8 @@ void ssb_chipco_resume(struct ssb_chipco
|
||||
void ssb_chipco_get_clockcpu(struct ssb_chipcommon *cc,
|
||||
u32 *plltype, u32 *n, u32 *m)
|
||||
{
|
||||
+ if ((chipco_read32(cc, SSB_CHIPCO_CHIPID) & SSB_CHIPCO_IDMASK) == 0x5354)
|
||||
+ return;
|
||||
*n = chipco_read32(cc, SSB_CHIPCO_CLOCK_N);
|
||||
*plltype = (cc->capabilities & SSB_CHIPCO_CAP_PLLT);
|
||||
switch (*plltype) {
|
||||
@@ -308,6 +310,8 @@ void ssb_chipco_get_clockcpu(struct ssb_
|
||||
void ssb_chipco_get_clockcontrol(struct ssb_chipcommon *cc,
|
||||
u32 *plltype, u32 *n, u32 *m)
|
||||
{
|
||||
+ if ((chipco_read32(cc, SSB_CHIPCO_CHIPID) & SSB_CHIPCO_IDMASK) == 0x5354)
|
||||
+ return;
|
||||
*n = chipco_read32(cc, SSB_CHIPCO_CLOCK_N);
|
||||
*plltype = (cc->capabilities & SSB_CHIPCO_CAP_PLLT);
|
||||
switch (*plltype) {
|
||||
--- a/drivers/ssb/driver_mipscore.c
|
||||
+++ b/drivers/ssb/driver_mipscore.c
|
||||
@@ -217,6 +217,8 @@ u32 ssb_cpu_clock(struct ssb_mipscore *m
|
||||
|
||||
if ((pll_type == SSB_PLLTYPE_5) || (bus->chip_id == 0x5365)) {
|
||||
rate = 200000000;
|
||||
+ } else if (bus->chip_id == 0x5354) {
|
||||
+ rate = 240000000;
|
||||
} else {
|
||||
rate = ssb_calc_clock_rate(pll_type, n, m);
|
||||
}
|
||||
--- a/drivers/ssb/main.c
|
||||
+++ b/drivers/ssb/main.c
|
||||
@@ -1105,6 +1105,8 @@ u32 ssb_clockspeed(struct ssb_bus *bus)
|
||||
|
||||
if (bus->chip_id == 0x5365) {
|
||||
rate = 100000000;
|
||||
+ } else if (bus->chip_id == 0x5354) {
|
||||
+ rate = 120000000;
|
||||
} else {
|
||||
rate = ssb_calc_clock_rate(plltype, clkctl_n, clkctl_m);
|
||||
if (plltype == SSB_PLLTYPE_3) /* 25Mhz, 2 dividers */
|
|
@ -1,16 +0,0 @@
|
|||
This prevents the options from being delete with make kernel_oldconfig.
|
||||
---
|
||||
drivers/ssb/Kconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/ssb/Kconfig
|
||||
+++ b/drivers/ssb/Kconfig
|
||||
@@ -141,6 +141,8 @@ config SSB_DRIVER_MIPS
|
||||
config SSB_EMBEDDED
|
||||
bool
|
||||
depends on SSB_DRIVER_MIPS
|
||||
+ select USB_EHCI_HCD_SSB if USB_EHCI_HCD
|
||||
+ select USB_OHCI_HCD_SSB if USB_OHCI_HCD
|
||||
default y
|
||||
|
||||
config SSB_DRIVER_EXTIF
|
|
@ -1,11 +0,0 @@
|
|||
--- a/arch/mips/include/asm/cacheflush.h
|
||||
+++ b/arch/mips/include/asm/cacheflush.h
|
||||
@@ -32,7 +32,7 @@
|
||||
extern void (*flush_cache_all)(void);
|
||||
extern void (*__flush_cache_all)(void);
|
||||
extern void (*flush_cache_mm)(struct mm_struct *mm);
|
||||
-#define flush_cache_dup_mm(mm) do { (void) (mm); } while (0)
|
||||
+#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
|
||||
extern void (*flush_cache_range)(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
|
|
@ -1,32 +0,0 @@
|
|||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -373,7 +373,7 @@ static inline void local_r4k___flush_cac
|
||||
}
|
||||
}
|
||||
|
||||
-static void r4k___flush_cache_all(void)
|
||||
+void r4k___flush_cache_all(void)
|
||||
{
|
||||
r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1);
|
||||
}
|
||||
@@ -537,7 +537,7 @@ static inline void local_r4k_flush_cache
|
||||
}
|
||||
}
|
||||
|
||||
-static void r4k_flush_cache_page(struct vm_area_struct *vma,
|
||||
+void r4k_flush_cache_page(struct vm_area_struct *vma,
|
||||
unsigned long addr, unsigned long pfn)
|
||||
{
|
||||
struct flush_cache_page_args args;
|
||||
@@ -1469,3 +1469,11 @@ void __cpuinit r4k_cache_init(void)
|
||||
coherency_setup();
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+/* fuse package DCACHE BUG patch exports */
|
||||
+void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
|
||||
+EXPORT_SYMBOL(fuse_flush_cache_all);
|
||||
+
|
||||
+void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
|
||||
+ unsigned long pfn) = r4k_flush_cache_page;
|
||||
+EXPORT_SYMBOL(fuse_flush_cache_page);
|
|
@ -1,82 +0,0 @@
|
|||
--- a/fs/fuse/dev.c
|
||||
+++ b/fs/fuse/dev.c
|
||||
@@ -533,6 +533,11 @@ static void fuse_copy_finish(struct fuse
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef DCACHE_BUG
|
||||
+extern void (*fuse_flush_cache_all)(void);
|
||||
+extern void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Get another pagefull of userspace buffer, and map it to kernel
|
||||
* address space, and lock request
|
||||
@@ -541,6 +546,9 @@ static int fuse_copy_fill(struct fuse_co
|
||||
{
|
||||
unsigned long offset;
|
||||
int err;
|
||||
+#ifdef DCACHE_BUG
|
||||
+ struct vm_area_struct *vma;
|
||||
+#endif
|
||||
|
||||
unlock_request(cs->fc, cs->req);
|
||||
fuse_copy_finish(cs);
|
||||
@@ -552,14 +560,22 @@ static int fuse_copy_fill(struct fuse_co
|
||||
cs->nr_segs--;
|
||||
}
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
+#ifndef DCACHE_BUG
|
||||
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
|
||||
&cs->pg, NULL);
|
||||
+#else
|
||||
+ err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
|
||||
+ &cs->pg, &vma);
|
||||
+#endif
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
if (err < 0)
|
||||
return err;
|
||||
BUG_ON(err != 1);
|
||||
offset = cs->addr % PAGE_SIZE;
|
||||
cs->mapaddr = kmap_atomic(cs->pg, KM_USER0);
|
||||
+#ifdef DCACHE_BUG
|
||||
+ fuse_flush_cache_page(vma, cs->addr, page_to_pfn(cs->pg));
|
||||
+#endif
|
||||
cs->buf = cs->mapaddr + offset;
|
||||
cs->len = min(PAGE_SIZE - offset, cs->seglen);
|
||||
cs->seglen -= cs->len;
|
||||
@@ -573,6 +589,11 @@ static int fuse_copy_do(struct fuse_copy
|
||||
{
|
||||
unsigned ncpy = min(*size, cs->len);
|
||||
if (val) {
|
||||
+#ifdef DCACHE_BUG
|
||||
+ // patch from mailing list, it is very important, otherwise,
|
||||
+ // can't mount, or ls mount point will hang
|
||||
+ fuse_flush_cache_all();
|
||||
+#endif
|
||||
if (cs->write)
|
||||
memcpy(cs->buf, *val, ncpy);
|
||||
else
|
||||
--- a/fs/fuse/fuse_i.h
|
||||
+++ b/fs/fuse/fuse_i.h
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#ifndef _FS_FUSE_I_H
|
||||
#define _FS_FUSE_I_H
|
||||
+#define DCACHE_BUG
|
||||
|
||||
#include <linux/fuse.h>
|
||||
#include <linux/fs.h>
|
||||
--- a/fs/fuse/inode.c
|
||||
+++ b/fs/fuse/inode.c
|
||||
@@ -1201,6 +1201,10 @@ static int __init fuse_init(void)
|
||||
printk(KERN_INFO "fuse init (API version %i.%i)\n",
|
||||
FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
|
||||
|
||||
+#ifdef DCACHE_BUG
|
||||
+printk("fuse init: DCACHE_BUG enabled\n");
|
||||
+#endif
|
||||
+
|
||||
INIT_LIST_HEAD(&fuse_conn_list);
|
||||
res = fuse_fs_init();
|
||||
if (res)
|
|
@ -1,66 +0,0 @@
|
|||
--- a/arch/mips/include/asm/page.h
|
||||
+++ b/arch/mips/include/asm/page.h
|
||||
@@ -43,6 +43,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/pfn.h>
|
||||
+#include <asm/cpu-features.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
extern void build_clear_page(void);
|
||||
@@ -78,13 +79,16 @@ static inline void clear_user_page(void
|
||||
flush_data_cache_page((unsigned long)addr);
|
||||
}
|
||||
|
||||
-extern void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
|
||||
- struct page *to);
|
||||
-struct vm_area_struct;
|
||||
-extern void copy_user_highpage(struct page *to, struct page *from,
|
||||
- unsigned long vaddr, struct vm_area_struct *vma);
|
||||
+static inline void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
|
||||
+ struct page *to)
|
||||
+{
|
||||
+ extern void (*flush_data_cache_page)(unsigned long addr);
|
||||
|
||||
-#define __HAVE_ARCH_COPY_USER_HIGHPAGE
|
||||
+ copy_page(vto, vfrom);
|
||||
+ if (!cpu_has_ic_fills_f_dc ||
|
||||
+ pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
|
||||
+ flush_data_cache_page((unsigned long)vto);
|
||||
+}
|
||||
|
||||
/*
|
||||
* These are used to make use of C type-checking..
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -204,30 +204,6 @@ void kunmap_coherent(void)
|
||||
preempt_check_resched();
|
||||
}
|
||||
|
||||
-void copy_user_highpage(struct page *to, struct page *from,
|
||||
- unsigned long vaddr, struct vm_area_struct *vma)
|
||||
-{
|
||||
- void *vfrom, *vto;
|
||||
-
|
||||
- vto = kmap_atomic(to, KM_USER1);
|
||||
- if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
- page_mapped(from) && !Page_dcache_dirty(from)) {
|
||||
- vfrom = kmap_coherent(from, vaddr);
|
||||
- copy_page(vto, vfrom);
|
||||
- kunmap_coherent();
|
||||
- } else {
|
||||
- vfrom = kmap_atomic(from, KM_USER0);
|
||||
- copy_page(vto, vfrom);
|
||||
- kunmap_atomic(vfrom, KM_USER0);
|
||||
- }
|
||||
- if ((!cpu_has_ic_fills_f_dc) ||
|
||||
- pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
|
||||
- flush_data_cache_page((unsigned long)vto);
|
||||
- kunmap_atomic(vto, KM_USER1);
|
||||
- /* Make sure this page is cleared on other CPU's too before using it */
|
||||
- smp_wmb();
|
||||
-}
|
||||
-
|
||||
void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
|
@ -1,56 +0,0 @@
|
|||
--- a/arch/mips/bcm47xx/nvram.c
|
||||
+++ b/arch/mips/bcm47xx/nvram.c
|
||||
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
|
||||
return NVRAM_ERR_ENVNOTFOUND;
|
||||
}
|
||||
EXPORT_SYMBOL(nvram_getenv);
|
||||
+
|
||||
+char *nvram_get(const char *name)
|
||||
+{
|
||||
+ char *var, *value, *end, *eq;
|
||||
+
|
||||
+ if (!name)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (!nvram_buf[0])
|
||||
+ early_nvram_init();
|
||||
+
|
||||
+ /* Look for name=value and return value */
|
||||
+ var = &nvram_buf[sizeof(struct nvram_header)];
|
||||
+ end = nvram_buf + sizeof(nvram_buf) - 2;
|
||||
+ end[0] = end[1] = '\0';
|
||||
+ for (; *var; var = value + strlen(value) + 1) {
|
||||
+ if (!(eq = strchr(var, '=')))
|
||||
+ break;
|
||||
+ value = eq + 1;
|
||||
+ if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
|
||||
+ return value;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(nvram_get);
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
|
||||
_machine_halt = bcm47xx_machine_halt;
|
||||
pm_power_off = bcm47xx_machine_halt;
|
||||
}
|
||||
+
|
||||
+static int __init bcm47xx_register_gpiodev(void)
|
||||
+{
|
||||
+ static struct resource res = {
|
||||
+ .start = 0xFFFFFFFF,
|
||||
+ };
|
||||
+ struct platform_device *pdev;
|
||||
+
|
||||
+ pdev = platform_device_register_simple("GPIODEV", 0, &res, 1);
|
||||
+ if (!pdev) {
|
||||
+ printk(KERN_ERR "bcm47xx: GPIODEV init failed\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+device_initcall(bcm47xx_register_gpiodev);
|
|
@ -1,18 +0,0 @@
|
|||
--- a/arch/mips/pci/pci.c
|
||||
+++ b/arch/mips/pci/pci.c
|
||||
@@ -185,12 +185,10 @@ static int pcibios_enable_resources(stru
|
||||
if ((idx == PCI_ROM_RESOURCE) &&
|
||||
(!(r->flags & IORESOURCE_ROM_ENABLE)))
|
||||
continue;
|
||||
- if (!r->start && r->end) {
|
||||
- printk(KERN_ERR "PCI: Device %s not available "
|
||||
- "because of resource collisions\n",
|
||||
+ if (!r->start && r->end)
|
||||
+ printk(KERN_WARNING "PCI: Device %s resource"
|
||||
+ "collisions detected. Ignoring...\n",
|
||||
pci_name(dev));
|
||||
- return -EINVAL;
|
||||
- }
|
||||
if (r->flags & IORESOURCE_IO)
|
||||
cmd |= PCI_COMMAND_IO;
|
||||
if (r->flags & IORESOURCE_MEM)
|
|
@ -1,14 +0,0 @@
|
|||
--- a/include/linux/ide.h
|
||||
+++ b/include/linux/ide.h
|
||||
@@ -195,7 +195,11 @@ static inline void ide_std_init_ports(st
|
||||
hw->io_ports.ctl_addr = ctl_addr;
|
||||
}
|
||||
|
||||
+#if defined CONFIG_BCM47XX
|
||||
+# define MAX_HWIFS 2
|
||||
+#else
|
||||
#define MAX_HWIFS 10
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Now for the data we need to maintain per-drive: ide_drive_t
|
|
@ -1,329 +0,0 @@
|
|||
--- a/drivers/net/tg3.c
|
||||
+++ b/drivers/net/tg3.c
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/firmware.h>
|
||||
+#include <linux/ssb/ssb_driver_gige.h>
|
||||
|
||||
#include <net/checksum.h>
|
||||
#include <net/ip.h>
|
||||
@@ -471,8 +472,9 @@ static void _tw32_flush(struct tg3 *tp,
|
||||
static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val)
|
||||
{
|
||||
tp->write32_mbox(tp, off, val);
|
||||
- if (!(tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) &&
|
||||
- !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND))
|
||||
+ if ((tp->tg3_flags3 & TG3_FLG3_FLUSH_POSTED_WRITES) ||
|
||||
+ (!(tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) &&
|
||||
+ !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)))
|
||||
tp->read32_mbox(tp, off);
|
||||
}
|
||||
|
||||
@@ -482,7 +484,7 @@ static void tg3_write32_tx_mbox(struct t
|
||||
writel(val, mbox);
|
||||
if (tp->tg3_flags & TG3_FLAG_TXD_MBOX_HWBUG)
|
||||
writel(val, mbox);
|
||||
- if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
|
||||
+ if ((tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) || (tp->tg3_flags3 & TG3_FLG3_FLUSH_POSTED_WRITES))
|
||||
readl(mbox);
|
||||
}
|
||||
|
||||
@@ -783,7 +785,7 @@ static void tg3_switch_clocks(struct tg3
|
||||
|
||||
#define PHY_BUSY_LOOPS 5000
|
||||
|
||||
-static int tg3_readphy(struct tg3 *tp, int reg, u32 *val)
|
||||
+static int __tg3_readphy(struct tg3 *tp, unsigned int phy_addr, int reg, u32 *val)
|
||||
{
|
||||
u32 frame_val;
|
||||
unsigned int loops;
|
||||
@@ -797,7 +799,7 @@ static int tg3_readphy(struct tg3 *tp, i
|
||||
|
||||
*val = 0x0;
|
||||
|
||||
- frame_val = ((tp->phy_addr << MI_COM_PHY_ADDR_SHIFT) &
|
||||
+ frame_val = ((phy_addr << MI_COM_PHY_ADDR_SHIFT) &
|
||||
MI_COM_PHY_ADDR_MASK);
|
||||
frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
|
||||
MI_COM_REG_ADDR_MASK);
|
||||
@@ -832,7 +834,12 @@ static int tg3_readphy(struct tg3 *tp, i
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
|
||||
+static int tg3_readphy(struct tg3 *tp, int reg, u32 *val)
|
||||
+{
|
||||
+ return __tg3_readphy(tp, tp->phy_addr, reg, val);
|
||||
+}
|
||||
+
|
||||
+static int __tg3_writephy(struct tg3 *tp, unsigned int phy_addr, int reg, u32 val)
|
||||
{
|
||||
u32 frame_val;
|
||||
unsigned int loops;
|
||||
@@ -848,7 +855,7 @@ static int tg3_writephy(struct tg3 *tp,
|
||||
udelay(80);
|
||||
}
|
||||
|
||||
- frame_val = ((tp->phy_addr << MI_COM_PHY_ADDR_SHIFT) &
|
||||
+ frame_val = ((phy_addr << MI_COM_PHY_ADDR_SHIFT) &
|
||||
MI_COM_PHY_ADDR_MASK);
|
||||
frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
|
||||
MI_COM_REG_ADDR_MASK);
|
||||
@@ -881,6 +888,11 @@ static int tg3_writephy(struct tg3 *tp,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
|
||||
+{
|
||||
+ return __tg3_writephy(tp, tp->phy_addr, reg, val);
|
||||
+}
|
||||
+
|
||||
static int tg3_bmcr_reset(struct tg3 *tp)
|
||||
{
|
||||
u32 phy_control;
|
||||
@@ -2389,6 +2401,9 @@ static int tg3_nvram_read(struct tg3 *tp
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
if (!(tp->tg3_flags & TG3_FLAG_NVRAM))
|
||||
return tg3_nvram_read_using_eeprom(tp, offset, val);
|
||||
|
||||
@@ -2720,8 +2735,10 @@ static int tg3_set_power_state(struct tg
|
||||
tg3_frob_aux_power(tp);
|
||||
|
||||
/* Workaround for unstable PLL clock */
|
||||
- if ((GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_AX) ||
|
||||
- (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_BX)) {
|
||||
+ if ((tp->phy_id & TG3_PHY_ID_MASK) != TG3_PHY_ID_BCM5750_2 &&
|
||||
+ /* !!! FIXME !!! */
|
||||
+ ((GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_AX) ||
|
||||
+ (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_BX))) {
|
||||
u32 val = tr32(0x7d00);
|
||||
|
||||
val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);
|
||||
@@ -3214,6 +3231,14 @@ relink:
|
||||
|
||||
tg3_phy_copper_begin(tp);
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
|
||||
+ current_link_up = 1;
|
||||
+ current_speed = SPEED_1000; /* FIXME */
|
||||
+ current_duplex = DUPLEX_FULL;
|
||||
+ tp->link_config.active_speed = current_speed;
|
||||
+ tp->link_config.active_duplex = current_duplex;
|
||||
+ }
|
||||
+
|
||||
tg3_readphy(tp, MII_BMSR, &tmp);
|
||||
if (!tg3_readphy(tp, MII_BMSR, &tmp) &&
|
||||
(tmp & BMSR_LSTATUS))
|
||||
@@ -6675,6 +6700,11 @@ static int tg3_poll_fw(struct tg3 *tp)
|
||||
int i;
|
||||
u32 val;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* We don't use firmware. */
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
|
||||
/* Wait up to 20ms for init done. */
|
||||
for (i = 0; i < 200; i++) {
|
||||
@@ -6958,6 +6988,14 @@ static int tg3_chip_reset(struct tg3 *tp
|
||||
tw32(0x5000, 0x400);
|
||||
}
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* BCM4785: In order to avoid repercussions from using potentially
|
||||
+ * defective internal ROM, stop the Rx RISC CPU, which is not
|
||||
+ * required. */
|
||||
+ tg3_stop_fw(tp);
|
||||
+ tg3_halt_cpu(tp, RX_CPU_BASE);
|
||||
+ }
|
||||
+
|
||||
tw32(GRC_MODE, tp->grc_mode);
|
||||
|
||||
if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0) {
|
||||
@@ -7135,9 +7173,12 @@ static int tg3_halt_cpu(struct tg3 *tp,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- /* Clear firmware's nvram arbitration. */
|
||||
- if (tp->tg3_flags & TG3_FLAG_NVRAM)
|
||||
- tw32(NVRAM_SWARB, SWARB_REQ_CLR0);
|
||||
+ if (!(tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE)) {
|
||||
+ /* Clear firmware's nvram arbitration. */
|
||||
+ if (tp->tg3_flags & TG3_FLAG_NVRAM)
|
||||
+ tw32(NVRAM_SWARB, SWARB_REQ_CLR0);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7199,6 +7240,11 @@ static int tg3_load_5701_a0_firmware_fix
|
||||
const __be32 *fw_data;
|
||||
int err, i;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* We don't use firmware. */
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
fw_data = (void *)tp->fw->data;
|
||||
|
||||
/* Firmware blob starts with version numbers, followed by
|
||||
@@ -7256,6 +7302,11 @@ static int tg3_load_tso_firmware(struct
|
||||
unsigned long cpu_base, cpu_scratch_base, cpu_scratch_size;
|
||||
int err, i;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* We don't use firmware. */
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO)
|
||||
return 0;
|
||||
|
||||
@@ -8380,6 +8431,11 @@ static void tg3_timer(unsigned long __op
|
||||
|
||||
spin_lock(&tp->lock);
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_FLUSH_POSTED_WRITES) {
|
||||
+ /* BCM4785: Flush posted writes from GbE to host memory. */
|
||||
+ tr32(HOSTCC_MODE);
|
||||
+ }
|
||||
+
|
||||
if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)) {
|
||||
/* All of this garbage is because when using non-tagged
|
||||
* IRQ status the mailbox/status_block protocol the chip
|
||||
@@ -10279,6 +10335,11 @@ static int tg3_test_nvram(struct tg3 *tp
|
||||
if (tp->tg3_flags3 & TG3_FLG3_NO_NVRAM)
|
||||
return 0;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* We don't have NVRAM. */
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (tg3_nvram_read(tp, 0, &magic) != 0)
|
||||
return -EIO;
|
||||
|
||||
@@ -11098,7 +11159,7 @@ static int tg3_ioctl(struct net_device *
|
||||
return -EAGAIN;
|
||||
|
||||
spin_lock_bh(&tp->lock);
|
||||
- err = tg3_readphy(tp, data->reg_num & 0x1f, &mii_regval);
|
||||
+ err = __tg3_readphy(tp, data->phy_id & 0x1f, data->reg_num & 0x1f, &mii_regval);
|
||||
spin_unlock_bh(&tp->lock);
|
||||
|
||||
data->val_out = mii_regval;
|
||||
@@ -11114,7 +11175,7 @@ static int tg3_ioctl(struct net_device *
|
||||
return -EAGAIN;
|
||||
|
||||
spin_lock_bh(&tp->lock);
|
||||
- err = tg3_writephy(tp, data->reg_num & 0x1f, data->val_in);
|
||||
+ err = __tg3_writephy(tp, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
|
||||
spin_unlock_bh(&tp->lock);
|
||||
|
||||
return err;
|
||||
@@ -11759,6 +11820,12 @@ static void __devinit tg3_get_5717_nvram
|
||||
/* Chips other than 5700/5701 use the NVRAM for fetching info. */
|
||||
static void __devinit tg3_nvram_init(struct tg3 *tp)
|
||||
{
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE) {
|
||||
+ /* No NVRAM and EEPROM on the SSB Broadcom GigE core. */
|
||||
+ tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
tw32_f(GRC_EEPROM_ADDR,
|
||||
(EEPROM_ADDR_FSM_RESET |
|
||||
(EEPROM_DEFAULT_CLOCK_PERIOD <<
|
||||
@@ -12020,6 +12087,9 @@ static int tg3_nvram_write_block(struct
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
if (tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) {
|
||||
tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl &
|
||||
~GRC_LCLCTRL_GPIO_OUTPUT1);
|
||||
@@ -13360,6 +13430,11 @@ static int __devinit tg3_get_invariants(
|
||||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)))
|
||||
tp->tg3_flags |= TG3_FLAG_SRAM_USE_CONFIG;
|
||||
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_FLUSH_POSTED_WRITES) {
|
||||
+ tp->write32_tx_mbox = tg3_write_flush_reg32;
|
||||
+ tp->write32_rx_mbox = tg3_write_flush_reg32;
|
||||
+ }
|
||||
+
|
||||
/* Get eeprom hw config before calling tg3_set_power_state().
|
||||
* In particular, the TG3_FLG2_IS_NIC flag must be
|
||||
* determined before calling tg3_set_power_state() so that
|
||||
@@ -13753,6 +13828,10 @@ static int __devinit tg3_get_device_addr
|
||||
}
|
||||
|
||||
if (!is_valid_ether_addr(&dev->dev_addr[0])) {
|
||||
+ if (tp->tg3_flags3 & TG3_FLG3_IS_SSB_CORE)
|
||||
+ ssb_gige_get_macaddr(tp->pdev, &dev->dev_addr[0]);
|
||||
+ }
|
||||
+ if (!is_valid_ether_addr(&dev->dev_addr[0])) {
|
||||
#ifdef CONFIG_SPARC
|
||||
if (!tg3_get_default_macaddr_sparc(tp))
|
||||
return 0;
|
||||
@@ -14272,6 +14351,7 @@ static char * __devinit tg3_phy_string(s
|
||||
case TG3_PHY_ID_BCM5704: return "5704";
|
||||
case TG3_PHY_ID_BCM5705: return "5705";
|
||||
case TG3_PHY_ID_BCM5750: return "5750";
|
||||
+ case TG3_PHY_ID_BCM5750_2: return "5750-2";
|
||||
case TG3_PHY_ID_BCM5752: return "5752";
|
||||
case TG3_PHY_ID_BCM5714: return "5714";
|
||||
case TG3_PHY_ID_BCM5780: return "5780";
|
||||
@@ -14481,6 +14561,13 @@ static int __devinit tg3_init_one(struct
|
||||
tp->msg_enable = tg3_debug;
|
||||
else
|
||||
tp->msg_enable = TG3_DEF_MSG_ENABLE;
|
||||
+ if (pdev_is_ssb_gige_core(pdev)) {
|
||||
+ tp->tg3_flags3 |= TG3_FLG3_IS_SSB_CORE;
|
||||
+ if (ssb_gige_must_flush_posted_writes(pdev))
|
||||
+ tp->tg3_flags3 |= TG3_FLG3_FLUSH_POSTED_WRITES;
|
||||
+ if (ssb_gige_have_roboswitch(pdev))
|
||||
+ tp->tg3_flags3 |= TG3_FLG3_ROBOSWITCH;
|
||||
+ }
|
||||
|
||||
/* The word/byte swap controls here control register access byte
|
||||
* swapping. DMA data byte swapping is controlled in the GRC_MODE
|
||||
--- a/drivers/net/tg3.h
|
||||
+++ b/drivers/net/tg3.h
|
||||
@@ -2014,6 +2014,9 @@
|
||||
#define NIC_SRAM_RGMII_INBAND_DISABLE 0x00000004
|
||||
#define NIC_SRAM_RGMII_EXT_IBND_RX_EN 0x00000008
|
||||
#define NIC_SRAM_RGMII_EXT_IBND_TX_EN 0x00000010
|
||||
+#define TG3_FLG3_IS_SSB_CORE 0x00000800
|
||||
+#define TG3_FLG3_FLUSH_POSTED_WRITES 0x00001000
|
||||
+#define TG3_FLG3_ROBOSWITCH 0x00002000
|
||||
|
||||
#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000
|
||||
|
||||
@@ -2930,6 +2933,7 @@ struct tg3 {
|
||||
#define TG3_PHY_ID_BCM5704 0x60008190
|
||||
#define TG3_PHY_ID_BCM5705 0x600081a0
|
||||
#define TG3_PHY_ID_BCM5750 0x60008180
|
||||
+#define TG3_PHY_ID_BCM5750_2 0xbc050cd0
|
||||
#define TG3_PHY_ID_BCM5752 0x60008100
|
||||
#define TG3_PHY_ID_BCM5714 0x60008340
|
||||
#define TG3_PHY_ID_BCM5780 0x60008350
|
||||
@@ -2964,7 +2968,8 @@ struct tg3 {
|
||||
(X) == TG3_PHY_ID_BCM5755 || (X) == TG3_PHY_ID_BCM5756 || \
|
||||
(X) == TG3_PHY_ID_BCM5906 || (X) == TG3_PHY_ID_BCM5761 || \
|
||||
(X) == TG3_PHY_ID_BCM5718C || (X) == TG3_PHY_ID_BCM5718S || \
|
||||
- (X) == TG3_PHY_ID_BCM57765 || (X) == TG3_PHY_ID_BCM8002)
|
||||
+ (X) == TG3_PHY_ID_BCM57765 || (X) == TG3_PHY_ID_BCM8002 || \
|
||||
+ (X) == TG3_PHY_ID_BCM5750_2)
|
||||
|
||||
u32 led_ctrl;
|
||||
u32 phy_otp;
|
|
@ -1,177 +0,0 @@
|
|||
--- a/arch/mips/bcm47xx/Makefile
|
||||
+++ b/arch/mips/bcm47xx/Makefile
|
||||
@@ -3,4 +3,4 @@
|
||||
# under Linux.
|
||||
#
|
||||
|
||||
-obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o wgt634u.o
|
||||
+obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o
|
||||
--- a/arch/mips/bcm47xx/wgt634u.c
|
||||
+++ /dev/null
|
||||
@@ -1,166 +0,0 @@
|
||||
-/*
|
||||
- * 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) 2007 Aurelien Jarno <aurelien@aurel32.net>
|
||||
- */
|
||||
-
|
||||
-#include <linux/platform_device.h>
|
||||
-#include <linux/module.h>
|
||||
-#include <linux/leds.h>
|
||||
-#include <linux/mtd/physmap.h>
|
||||
-#include <linux/ssb/ssb.h>
|
||||
-#include <linux/interrupt.h>
|
||||
-#include <linux/reboot.h>
|
||||
-#include <linux/gpio.h>
|
||||
-#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
-
|
||||
-/* GPIO definitions for the WGT634U */
|
||||
-#define WGT634U_GPIO_LED 3
|
||||
-#define WGT634U_GPIO_RESET 2
|
||||
-#define WGT634U_GPIO_TP1 7
|
||||
-#define WGT634U_GPIO_TP2 6
|
||||
-#define WGT634U_GPIO_TP3 5
|
||||
-#define WGT634U_GPIO_TP4 4
|
||||
-#define WGT634U_GPIO_TP5 1
|
||||
-
|
||||
-static struct gpio_led wgt634u_leds[] = {
|
||||
- {
|
||||
- .name = "power",
|
||||
- .gpio = WGT634U_GPIO_LED,
|
||||
- .active_low = 1,
|
||||
- .default_trigger = "heartbeat",
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct gpio_led_platform_data wgt634u_led_data = {
|
||||
- .num_leds = ARRAY_SIZE(wgt634u_leds),
|
||||
- .leds = wgt634u_leds,
|
||||
-};
|
||||
-
|
||||
-static struct platform_device wgt634u_gpio_leds = {
|
||||
- .name = "leds-gpio",
|
||||
- .id = -1,
|
||||
- .dev = {
|
||||
- .platform_data = &wgt634u_led_data,
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-
|
||||
-/* 8MiB flash. The struct mtd_partition matches original Netgear WGT634U
|
||||
- firmware. */
|
||||
-static struct mtd_partition wgt634u_partitions[] = {
|
||||
- {
|
||||
- .name = "cfe",
|
||||
- .offset = 0,
|
||||
- .size = 0x60000, /* 384k */
|
||||
- .mask_flags = MTD_WRITEABLE /* force read-only */
|
||||
- },
|
||||
- {
|
||||
- .name = "config",
|
||||
- .offset = 0x60000,
|
||||
- .size = 0x20000 /* 128k */
|
||||
- },
|
||||
- {
|
||||
- .name = "linux",
|
||||
- .offset = 0x80000,
|
||||
- .size = 0x140000 /* 1280k */
|
||||
- },
|
||||
- {
|
||||
- .name = "jffs",
|
||||
- .offset = 0x1c0000,
|
||||
- .size = 0x620000 /* 6272k */
|
||||
- },
|
||||
- {
|
||||
- .name = "nvram",
|
||||
- .offset = 0x7e0000,
|
||||
- .size = 0x20000 /* 128k */
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct physmap_flash_data wgt634u_flash_data = {
|
||||
- .parts = wgt634u_partitions,
|
||||
- .nr_parts = ARRAY_SIZE(wgt634u_partitions)
|
||||
-};
|
||||
-
|
||||
-static struct resource wgt634u_flash_resource = {
|
||||
- .flags = IORESOURCE_MEM,
|
||||
-};
|
||||
-
|
||||
-static struct platform_device wgt634u_flash = {
|
||||
- .name = "physmap-flash",
|
||||
- .id = 0,
|
||||
- .dev = { .platform_data = &wgt634u_flash_data, },
|
||||
- .resource = &wgt634u_flash_resource,
|
||||
- .num_resources = 1,
|
||||
-};
|
||||
-
|
||||
-/* Platform devices */
|
||||
-static struct platform_device *wgt634u_devices[] __initdata = {
|
||||
- &wgt634u_flash,
|
||||
- &wgt634u_gpio_leds,
|
||||
-};
|
||||
-
|
||||
-static irqreturn_t gpio_interrupt(int irq, void *ignored)
|
||||
-{
|
||||
- int state;
|
||||
-
|
||||
- /* Interrupts are shared, check if the current one is
|
||||
- a GPIO interrupt. */
|
||||
- if (!ssb_chipco_irq_status(&ssb_bcm47xx.chipco,
|
||||
- SSB_CHIPCO_IRQ_GPIO))
|
||||
- return IRQ_NONE;
|
||||
-
|
||||
- state = gpio_get_value(WGT634U_GPIO_RESET);
|
||||
-
|
||||
- /* Interrupt are level triggered, revert the interrupt polarity
|
||||
- to clear the interrupt. */
|
||||
- gpio_polarity(WGT634U_GPIO_RESET, state);
|
||||
-
|
||||
- if (!state) {
|
||||
- printk(KERN_INFO "Reset button pressed");
|
||||
- ctrl_alt_del();
|
||||
- }
|
||||
-
|
||||
- return IRQ_HANDLED;
|
||||
-}
|
||||
-
|
||||
-static int __init wgt634u_init(void)
|
||||
-{
|
||||
- /* There is no easy way to detect that we are running on a WGT634U
|
||||
- * machine. Use the MAC address as an heuristic. Netgear Inc. has
|
||||
- * been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx.
|
||||
- */
|
||||
-
|
||||
- u8 *et0mac = ssb_bcm47xx.sprom.et0mac;
|
||||
-
|
||||
- if (et0mac[0] == 0x00 &&
|
||||
- ((et0mac[1] == 0x09 && et0mac[2] == 0x5b) ||
|
||||
- (et0mac[1] == 0x0f && et0mac[2] == 0xb5))) {
|
||||
- struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
|
||||
-
|
||||
- printk(KERN_INFO "WGT634U machine detected.\n");
|
||||
-
|
||||
- if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET),
|
||||
- gpio_interrupt, IRQF_SHARED,
|
||||
- "WGT634U GPIO", &ssb_bcm47xx.chipco)) {
|
||||
- gpio_direction_input(WGT634U_GPIO_RESET);
|
||||
- gpio_intmask(WGT634U_GPIO_RESET, 1);
|
||||
- ssb_chipco_irq_mask(&ssb_bcm47xx.chipco,
|
||||
- SSB_CHIPCO_IRQ_GPIO,
|
||||
- SSB_CHIPCO_IRQ_GPIO);
|
||||
- }
|
||||
-
|
||||
- wgt634u_flash_data.width = mcore->flash_buswidth;
|
||||
- wgt634u_flash_resource.start = mcore->flash_window;
|
||||
- wgt634u_flash_resource.end = mcore->flash_window
|
||||
- + mcore->flash_window_size
|
||||
- - 1;
|
||||
- return platform_add_devices(wgt634u_devices,
|
||||
- ARRAY_SIZE(wgt634u_devices));
|
||||
- } else
|
||||
- return -ENODEV;
|
||||
-}
|
||||
-
|
||||
-module_init(wgt634u_init);
|
|
@ -1,305 +0,0 @@
|
|||
The Netgear wgt634u uses a different format for storing the
|
||||
configuration. This patch is needed to read out the correct
|
||||
configuration. The cfe_env.c file uses a different method way to read
|
||||
out the configuration than the in kernel cfe config reader.
|
||||
|
||||
--- a/arch/mips/bcm47xx/Makefile
|
||||
+++ b/arch/mips/bcm47xx/Makefile
|
||||
@@ -3,4 +3,4 @@
|
||||
# under Linux.
|
||||
#
|
||||
|
||||
-obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o
|
||||
+obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o cfe_env.o
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/bcm47xx/cfe_env.c
|
||||
@@ -0,0 +1,229 @@
|
||||
+/*
|
||||
+ * CFE environment variable access
|
||||
+ *
|
||||
+ * Copyright 2001-2003, Broadcom Corporation
|
||||
+ * Copyright 2006, Felix Fietkau <nbd@openwrt.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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/uaccess.h>
|
||||
+
|
||||
+#define NVRAM_SIZE (0x1ff0)
|
||||
+static char _nvdata[NVRAM_SIZE];
|
||||
+static char _valuestr[256];
|
||||
+
|
||||
+/*
|
||||
+ * TLV types. These codes are used in the "type-length-value"
|
||||
+ * encoding of the items stored in the NVRAM device (flash or EEPROM)
|
||||
+ *
|
||||
+ * The layout of the flash/nvram is as follows:
|
||||
+ *
|
||||
+ * <type> <length> <data ...> <type> <length> <data ...> <type_end>
|
||||
+ *
|
||||
+ * The type code of "ENV_TLV_TYPE_END" marks the end of the list.
|
||||
+ * The "length" field marks the length of the data section, not
|
||||
+ * including the type and length fields.
|
||||
+ *
|
||||
+ * Environment variables are stored as follows:
|
||||
+ *
|
||||
+ * <type_env> <length> <flags> <name> = <value>
|
||||
+ *
|
||||
+ * If bit 0 (low bit) is set, the length is an 8-bit value.
|
||||
+ * If bit 0 (low bit) is clear, the length is a 16-bit value
|
||||
+ *
|
||||
+ * Bit 7 set indicates "user" TLVs. In this case, bit 0 still
|
||||
+ * indicates the size of the length field.
|
||||
+ *
|
||||
+ * Flags are from the constants below:
|
||||
+ *
|
||||
+ */
|
||||
+#define ENV_LENGTH_16BITS 0x00 /* for low bit */
|
||||
+#define ENV_LENGTH_8BITS 0x01
|
||||
+
|
||||
+#define ENV_TYPE_USER 0x80
|
||||
+
|
||||
+#define ENV_CODE_SYS(n,l) (((n)<<1)|(l))
|
||||
+#define ENV_CODE_USER(n,l) ((((n)<<1)|(l)) | ENV_TYPE_USER)
|
||||
+
|
||||
+/*
|
||||
+ * The actual TLV types we support
|
||||
+ */
|
||||
+
|
||||
+#define ENV_TLV_TYPE_END 0x00
|
||||
+#define ENV_TLV_TYPE_ENV ENV_CODE_SYS(0,ENV_LENGTH_8BITS)
|
||||
+
|
||||
+/*
|
||||
+ * Environment variable flags
|
||||
+ */
|
||||
+
|
||||
+#define ENV_FLG_NORMAL 0x00 /* normal read/write */
|
||||
+#define ENV_FLG_BUILTIN 0x01 /* builtin - not stored in flash */
|
||||
+#define ENV_FLG_READONLY 0x02 /* read-only - cannot be changed */
|
||||
+
|
||||
+#define ENV_FLG_MASK 0xFF /* mask of attributes we keep */
|
||||
+#define ENV_FLG_ADMIN 0x100 /* lets us internally override permissions */
|
||||
+
|
||||
+
|
||||
+/* *********************************************************************
|
||||
+ * _nvram_read(buffer,offset,length)
|
||||
+ *
|
||||
+ * Read data from the NVRAM device
|
||||
+ *
|
||||
+ * Input parameters:
|
||||
+ * buffer - destination buffer
|
||||
+ * offset - offset of data to read
|
||||
+ * length - number of bytes to read
|
||||
+ *
|
||||
+ * Return value:
|
||||
+ * number of bytes read, or <0 if error occured
|
||||
+ ********************************************************************* */
|
||||
+static int
|
||||
+_nvram_read(unsigned char *nv_buf, unsigned char *buffer, int offset, int length)
|
||||
+{
|
||||
+ int i;
|
||||
+ if (offset > NVRAM_SIZE)
|
||||
+ return -1;
|
||||
+
|
||||
+ for ( i = 0; i < length; i++) {
|
||||
+ buffer[i] = ((volatile unsigned char*)nv_buf)[offset + i];
|
||||
+ }
|
||||
+ return length;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static char*
|
||||
+_strnchr(const char *dest,int c,size_t cnt)
|
||||
+{
|
||||
+ while (*dest && (cnt > 0)) {
|
||||
+ if (*dest == c) return (char *) dest;
|
||||
+ dest++;
|
||||
+ cnt--;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * Core support API: Externally visible.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Get the value of an NVRAM variable
|
||||
+ * @param name name of variable to get
|
||||
+ * @return value of variable or NULL if undefined
|
||||
+ */
|
||||
+
|
||||
+char*
|
||||
+cfe_env_get(unsigned char *nv_buf, char* name)
|
||||
+{
|
||||
+ int size;
|
||||
+ unsigned char *buffer;
|
||||
+ unsigned char *ptr;
|
||||
+ unsigned char *envval;
|
||||
+ unsigned int reclen;
|
||||
+ unsigned int rectype;
|
||||
+ int offset;
|
||||
+ int flg;
|
||||
+
|
||||
+ if (!strcmp(name, "nvram_type"))
|
||||
+ return "cfe";
|
||||
+
|
||||
+ size = NVRAM_SIZE;
|
||||
+ buffer = &_nvdata[0];
|
||||
+
|
||||
+ ptr = buffer;
|
||||
+ offset = 0;
|
||||
+
|
||||
+ /* Read the record type and length */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ while ((*ptr != ENV_TLV_TYPE_END) && (size > 1)) {
|
||||
+
|
||||
+ /* Adjust pointer for TLV type */
|
||||
+ rectype = *(ptr);
|
||||
+ offset++;
|
||||
+ size--;
|
||||
+
|
||||
+ /*
|
||||
+ * Read the length. It can be either 1 or 2 bytes
|
||||
+ * depending on the code
|
||||
+ */
|
||||
+ if (rectype & ENV_LENGTH_8BITS) {
|
||||
+ /* Read the record type and length - 8 bits */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+ reclen = *(ptr);
|
||||
+ size--;
|
||||
+ offset++;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Read the record type and length - 16 bits, MSB first */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,2) != 2) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+ reclen = (((unsigned int) *(ptr)) << 8) + (unsigned int) *(ptr+1);
|
||||
+ size -= 2;
|
||||
+ offset += 2;
|
||||
+ }
|
||||
+
|
||||
+ if (reclen > size)
|
||||
+ break; /* should not happen, bad NVRAM */
|
||||
+
|
||||
+ switch (rectype) {
|
||||
+ case ENV_TLV_TYPE_ENV:
|
||||
+ /* Read the TLV data */
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,reclen) != reclen)
|
||||
+ goto error;
|
||||
+ flg = *ptr++;
|
||||
+ envval = (unsigned char *) _strnchr(ptr,'=',(reclen-1));
|
||||
+ if (envval) {
|
||||
+ *envval++ = '\0';
|
||||
+ memcpy(_valuestr,envval,(reclen-1)-(envval-ptr));
|
||||
+ _valuestr[(reclen-1)-(envval-ptr)] = '\0';
|
||||
+#if 0
|
||||
+ printk(KERN_INFO "NVRAM:%s=%s\n", ptr, _valuestr);
|
||||
+#endif
|
||||
+ if(!strcmp(ptr, name)){
|
||||
+ return _valuestr;
|
||||
+ }
|
||||
+ if((strlen(ptr) > 1) && !strcmp(&ptr[1], name))
|
||||
+ return _valuestr;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ /* Unknown TLV type, skip it. */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Advance to next TLV
|
||||
+ */
|
||||
+
|
||||
+ size -= (int)reclen;
|
||||
+ offset += reclen;
|
||||
+
|
||||
+ /* Read the next record type */
|
||||
+ ptr = buffer;
|
||||
+ if (_nvram_read(nv_buf, ptr,offset,1) != 1)
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+error:
|
||||
+ return NULL;
|
||||
+
|
||||
+}
|
||||
+
|
||||
--- a/arch/mips/bcm47xx/nvram.c
|
||||
+++ b/arch/mips/bcm47xx/nvram.c
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
|
||||
static char nvram_buf[NVRAM_SPACE];
|
||||
+static int cfe_env;
|
||||
+extern char *cfe_env_get(char *nv_buf, const char *name);
|
||||
|
||||
/* Probe for NVRAM header */
|
||||
static void __init early_nvram_init(void)
|
||||
@@ -33,6 +35,25 @@ static void __init early_nvram_init(void
|
||||
|
||||
base = mcore->flash_window;
|
||||
lim = mcore->flash_window_size;
|
||||
+ cfe_env = 0;
|
||||
+
|
||||
+ /* XXX: hack for supporting the CFE environment stuff on WGT634U */
|
||||
+ if (lim >= 8 * 1024 * 1024) {
|
||||
+ src = (u32 *) KSEG1ADDR(base + 8 * 1024 * 1024 - 0x2000);
|
||||
+ dst = (u32 *) nvram_buf;
|
||||
+
|
||||
+ if ((*src & 0xff00ff) == 0x000001) {
|
||||
+ printk("early_nvram_init: WGT634U NVRAM found.\n");
|
||||
+
|
||||
+ for (i = 0; i < 0x1ff0; i++) {
|
||||
+ if (*src == 0xFFFFFFFF)
|
||||
+ break;
|
||||
+ *dst++ = *src++;
|
||||
+ }
|
||||
+ cfe_env = 1;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
off = FLASH_MIN;
|
||||
while (off <= lim) {
|
||||
@@ -74,6 +95,12 @@ int nvram_getenv(char *name, char *val,
|
||||
if (!nvram_buf[0])
|
||||
early_nvram_init();
|
||||
|
||||
+ if (cfe_env) {
|
||||
+ value = cfe_env_get(nvram_buf, name);
|
||||
+ snprintf(val, val_len, "%s", value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
/* Look for name=value and return value */
|
||||
var = &nvram_buf[sizeof(struct nvram_header)];
|
||||
end = nvram_buf + sizeof(nvram_buf) - 2;
|
||||
@@ -103,6 +130,9 @@ char *nvram_get(const char *name)
|
||||
if (!nvram_buf[0])
|
||||
early_nvram_init();
|
||||
|
||||
+ if (cfe_env)
|
||||
+ return cfe_env_get(nvram_buf, name);
|
||||
+
|
||||
/* Look for name=value and return value */
|
||||
var = &nvram_buf[sizeof(struct nvram_header)];
|
||||
end = nvram_buf + sizeof(nvram_buf) - 2;
|
|
@ -1,89 +0,0 @@
|
|||
--- a/drivers/watchdog/bcm47xx_wdt.c
|
||||
+++ b/drivers/watchdog/bcm47xx_wdt.c
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#define WDT_DEFAULT_TIME 30 /* seconds */
|
||||
#define WDT_MAX_TIME 255 /* seconds */
|
||||
+#define WDT_SHIFT 15 /* 32.768 KHz on cores with slow WDT clock */
|
||||
|
||||
static int wdt_time = WDT_DEFAULT_TIME;
|
||||
static int nowayout = WATCHDOG_NOWAYOUT;
|
||||
@@ -50,11 +51,11 @@ static unsigned long bcm47xx_wdt_busy;
|
||||
static char expect_release;
|
||||
static struct timer_list wdt_timer;
|
||||
static atomic_t ticks;
|
||||
+static int needs_sw_scale;
|
||||
|
||||
-static inline void bcm47xx_wdt_hw_start(void)
|
||||
+static inline void bcm47xx_wdt_hw_start(u32 ticks)
|
||||
{
|
||||
- /* this is 2,5s on 100Mhz clock and 2s on 133 Mhz */
|
||||
- ssb_watchdog_timer_set(&ssb_bcm47xx, 0xfffffff);
|
||||
+ ssb_watchdog_timer_set(&ssb_bcm47xx, ticks);
|
||||
}
|
||||
|
||||
static inline int bcm47xx_wdt_hw_stop(void)
|
||||
@@ -65,33 +66,34 @@ static inline int bcm47xx_wdt_hw_stop(vo
|
||||
static void bcm47xx_timer_tick(unsigned long unused)
|
||||
{
|
||||
if (!atomic_dec_and_test(&ticks)) {
|
||||
- bcm47xx_wdt_hw_start();
|
||||
+ /* This is 2,5s on 100Mhz clock and 2s on 133 Mhz */
|
||||
+ bcm47xx_wdt_hw_start(0xfffffff);
|
||||
mod_timer(&wdt_timer, jiffies + HZ);
|
||||
} else {
|
||||
- printk(KERN_CRIT DRV_NAME "Watchdog will fire soon!!!\n");
|
||||
+ printk(KERN_CRIT DRV_NAME ": Watchdog will fire soon!!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
-static inline void bcm47xx_wdt_pet(void)
|
||||
+static void bcm47xx_wdt_pet(void)
|
||||
{
|
||||
- atomic_set(&ticks, wdt_time);
|
||||
+ if(needs_sw_scale)
|
||||
+ atomic_set(&ticks, wdt_time);
|
||||
+ else
|
||||
+ bcm47xx_wdt_hw_start(wdt_time << WDT_SHIFT);
|
||||
}
|
||||
|
||||
static void bcm47xx_wdt_start(void)
|
||||
{
|
||||
bcm47xx_wdt_pet();
|
||||
- bcm47xx_timer_tick(0);
|
||||
-}
|
||||
-
|
||||
-static void bcm47xx_wdt_pause(void)
|
||||
-{
|
||||
- del_timer_sync(&wdt_timer);
|
||||
- bcm47xx_wdt_hw_stop();
|
||||
+ if(needs_sw_scale)
|
||||
+ bcm47xx_timer_tick(0);
|
||||
}
|
||||
|
||||
static void bcm47xx_wdt_stop(void)
|
||||
{
|
||||
- bcm47xx_wdt_pause();
|
||||
+ if(needs_sw_scale)
|
||||
+ del_timer_sync(&wdt_timer);
|
||||
+ bcm47xx_wdt_hw_stop();
|
||||
}
|
||||
|
||||
static int bcm47xx_wdt_settimeout(int new_time)
|
||||
@@ -243,7 +245,15 @@ static int __init bcm47xx_wdt_init(void)
|
||||
if (bcm47xx_wdt_hw_stop() < 0)
|
||||
return -ENODEV;
|
||||
|
||||
- setup_timer(&wdt_timer, bcm47xx_timer_tick, 0L);
|
||||
+ /* FIXME Other cores */
|
||||
+ if(ssb_bcm47xx.chip_id == 0x5354) {
|
||||
+ /* Slow WDT clock, no pre-scaling */
|
||||
+ needs_sw_scale = 0;
|
||||
+ } else {
|
||||
+ /* Fast WDT clock, needs software pre-scaling */
|
||||
+ needs_sw_scale = 1;
|
||||
+ setup_timer(&wdt_timer, bcm47xx_timer_tick, 0L);
|
||||
+ }
|
||||
|
||||
if (bcm47xx_wdt_settimeout(wdt_time)) {
|
||||
bcm47xx_wdt_settimeout(WDT_DEFAULT_TIME);
|
|
@ -1,138 +0,0 @@
|
|||
--- a/arch/mips/include/asm/r4kcache.h
|
||||
+++ b/arch/mips/include/asm/r4kcache.h
|
||||
@@ -20,10 +20,28 @@
|
||||
#ifdef CONFIG_BCM47XX
|
||||
#include <asm/paccess.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
-#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
||||
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
||||
+
|
||||
+static inline unsigned long bcm4710_dummy_rreg(void)
|
||||
+{
|
||||
+ return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
|
||||
+}
|
||||
+
|
||||
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
||||
+
|
||||
+static inline unsigned long bcm4710_fill_tlb(void *addr)
|
||||
+{
|
||||
+ return *(unsigned long *)addr;
|
||||
+}
|
||||
+
|
||||
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
||||
+
|
||||
+static inline void bcm4710_protected_fill_tlb(void *addr)
|
||||
+{
|
||||
+ unsigned long x;
|
||||
+ get_dbe(x, (unsigned long *)addr);;
|
||||
+}
|
||||
|
||||
-#define BCM4710_FILL_TLB(addr) (*(volatile unsigned long *)(addr))
|
||||
-#define BCM4710_PROTECTED_FILL_TLB(addr) ({ unsigned long x; get_dbe(x, (volatile unsigned long *)(addr)); })
|
||||
#else
|
||||
#define BCM4710_DUMMY_RREG()
|
||||
|
||||
--- a/arch/mips/mm/tlbex.c
|
||||
+++ b/arch/mips/mm/tlbex.c
|
||||
@@ -707,6 +707,9 @@ build_get_pgde32(u32 **p, unsigned int t
|
||||
#endif
|
||||
uasm_i_addu(p, ptr, tmp, ptr);
|
||||
#else
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+#endif
|
||||
UASM_i_LA_mostly(p, ptr, pgdc);
|
||||
#endif
|
||||
uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
|
||||
@@ -868,12 +871,12 @@ static void __cpuinit build_r4000_tlb_re
|
||||
/* No need for uasm_i_nop */
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_BCM47XX
|
||||
- uasm_i_nop(&p);
|
||||
-#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
|
||||
#else
|
||||
+# ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(&p);
|
||||
+# endif
|
||||
build_get_pgde32(&p, K0, K1); /* get pgd in K1 */
|
||||
#endif
|
||||
|
||||
@@ -885,6 +888,9 @@ static void __cpuinit build_r4000_tlb_re
|
||||
build_update_entries(&p, K0, K1);
|
||||
build_tlb_write_entry(&p, &l, &r, tlb_random);
|
||||
uasm_l_leave(&l, p);
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(&p);
|
||||
+#endif
|
||||
uasm_i_eret(&p); /* return from trap */
|
||||
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
@@ -1321,12 +1327,12 @@ build_r4000_tlbchange_handler_head(u32 *
|
||||
struct uasm_reloc **r, unsigned int pte,
|
||||
unsigned int ptr)
|
||||
{
|
||||
-#ifdef CONFIG_BCM47XX
|
||||
- uasm_i_nop(p);
|
||||
-#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(p, l, r, pte, ptr); /* get pmd in ptr */
|
||||
#else
|
||||
+# ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+# endif
|
||||
build_get_pgde32(p, pte, ptr); /* get pgd in ptr */
|
||||
#endif
|
||||
|
||||
@@ -1363,6 +1369,9 @@ build_r4000_tlbchange_handler_tail(u32 *
|
||||
build_update_entries(p, tmp, ptr);
|
||||
build_tlb_write_entry(p, l, r, tlb_indexed);
|
||||
uasm_l_leave(l, *p);
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ uasm_i_nop(p);
|
||||
+#endif
|
||||
uasm_i_eret(p); /* return from trap */
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
--- a/arch/mips/kernel/genex.S
|
||||
+++ b/arch/mips/kernel/genex.S
|
||||
@@ -22,6 +22,19 @@
|
||||
#include <asm/page.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+# ifdef eret
|
||||
+# undef eret
|
||||
+# endif
|
||||
+# define eret \
|
||||
+ .set push; \
|
||||
+ .set noreorder; \
|
||||
+ nop; \
|
||||
+ nop; \
|
||||
+ eret; \
|
||||
+ .set pop;
|
||||
+#endif
|
||||
+
|
||||
#define PANIC_PIC(msg) \
|
||||
.set push; \
|
||||
.set reorder; \
|
||||
@@ -54,7 +67,6 @@ NESTED(except_vec3_generic, 0, sp)
|
||||
.set noat
|
||||
#ifdef CONFIG_BCM47XX
|
||||
nop
|
||||
- nop
|
||||
#endif
|
||||
#if R5432_CP0_INTERRUPT_WAR
|
||||
mfc0 k0, CP0_INDEX
|
||||
@@ -79,6 +91,9 @@ NESTED(except_vec3_r4000, 0, sp)
|
||||
.set push
|
||||
.set mips3
|
||||
.set noat
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
+ nop
|
||||
+#endif
|
||||
mfc0 k1, CP0_CAUSE
|
||||
li k0, 31<<2
|
||||
andi k1, k1, 0x7c
|
|
@ -1,46 +0,0 @@
|
|||
--- a/drivers/pcmcia/yenta_socket.c
|
||||
+++ b/drivers/pcmcia/yenta_socket.c
|
||||
@@ -924,6 +924,8 @@ static unsigned int yenta_probe_irq(stru
|
||||
* Probe for usable interrupts using the force
|
||||
* register to generate bogus card status events.
|
||||
*/
|
||||
+#ifndef CONFIG_BCM47XX
|
||||
+ /* WRT54G3G does not like this */
|
||||
cb_writel(socket, CB_SOCKET_EVENT, -1);
|
||||
cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
|
||||
reg = exca_readb(socket, I365_CSCINT);
|
||||
@@ -939,6 +941,7 @@ static unsigned int yenta_probe_irq(stru
|
||||
}
|
||||
cb_writel(socket, CB_SOCKET_MASK, 0);
|
||||
exca_writeb(socket, I365_CSCINT, reg);
|
||||
+#endif
|
||||
|
||||
mask = probe_irq_mask(val) & 0xffff;
|
||||
|
||||
@@ -1023,6 +1026,10 @@ static void yenta_get_socket_capabilitie
|
||||
else
|
||||
socket->socket.irq_mask = 0;
|
||||
|
||||
+ /* irq mask probing is broken for the WRT54G3G */
|
||||
+ if (socket->socket.irq_mask == 0)
|
||||
+ socket->socket.irq_mask = 0x6f8;
|
||||
+
|
||||
dev_printk(KERN_INFO, &socket->dev->dev,
|
||||
"ISA IRQ mask 0x%04x, PCI irq %d\n",
|
||||
socket->socket.irq_mask, socket->cb_irq);
|
||||
@@ -1261,6 +1268,15 @@ static int __devinit yenta_probe(struct
|
||||
dev_printk(KERN_INFO, &dev->dev,
|
||||
"Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
|
||||
|
||||
+ /* Generate an interrupt on card insert/remove */
|
||||
+ config_writew(socket, CB_SOCKET_MASK, CB_CSTSMASK | CB_CDMASK);
|
||||
+
|
||||
+ /* Set up Multifunction Routing Status Register */
|
||||
+ config_writew(socket, 0x8C, 0x1000 /* MFUNC3 to GPIO3 */ | 0x2 /* MFUNC0 to INTA */);
|
||||
+
|
||||
+ /* Switch interrupts to parallelized */
|
||||
+ config_writeb(socket, 0x92, 0x64);
|
||||
+
|
||||
yenta_fixup_parent_bridge(dev->subordinate);
|
||||
|
||||
/* Register it with the pcmcia layer.. */
|
|
@ -1,104 +0,0 @@
|
|||
--- a/drivers/ssb/scan.c
|
||||
+++ b/drivers/ssb/scan.c
|
||||
@@ -92,6 +92,14 @@ const char *ssb_core_name(u16 coreid)
|
||||
return "ARM 1176";
|
||||
case SSB_DEV_ARM_7TDMI:
|
||||
return "ARM 7TDMI";
|
||||
+ case SSB_DEV_ETHERNET_GBIT2:
|
||||
+ return "Gigabit MAC";
|
||||
+ case SSB_DEV_MIPS_74K:
|
||||
+ return "MIPS 74k";
|
||||
+ case SSB_DEV_DDR_CTRLR:
|
||||
+ return "DDR1/2 memory controller";
|
||||
+ case SSB_DEV_I2S:
|
||||
+ return "I2S";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
@@ -150,6 +158,7 @@ static u8 chipid_to_nrcores(u16 chipid)
|
||||
case 0x4710:
|
||||
case 0x4610:
|
||||
case 0x4704:
|
||||
+ case 0x4716:
|
||||
return 9;
|
||||
default:
|
||||
ssb_printk(KERN_ERR PFX
|
||||
--- a/include/linux/ssb/ssb.h
|
||||
+++ b/include/linux/ssb/ssb.h
|
||||
@@ -155,9 +155,16 @@ struct ssb_bus_ops {
|
||||
#define SSB_DEV_MINI_MACPHY 0x823
|
||||
#define SSB_DEV_ARM_1176 0x824
|
||||
#define SSB_DEV_ARM_7TDMI 0x825
|
||||
+#define SSB_DEV_ETHERNET_GBIT2 0x82d
|
||||
+#define SSB_DEV_MIPS_74K 0x82c
|
||||
+#define SSB_DEV_DDR_CTRLR 0x82e
|
||||
+#define SSB_DEV_I2S 0x834
|
||||
+#define SSB_DEV_DEFAULT 0xfff
|
||||
|
||||
/* Vendor-ID values */
|
||||
#define SSB_VENDOR_BROADCOM 0x4243
|
||||
+#define SSB_VENDOR_BROADCOM2 0x04BF
|
||||
+#define SSB_VENDOR_ARM 0x43b
|
||||
|
||||
/* Some kernel subsystems poke with dev->drvdata, so we must use the
|
||||
* following ugly workaround to get from struct device to struct ssb_device */
|
||||
--- a/include/linux/ssb/ssb_regs.h
|
||||
+++ b/include/linux/ssb/ssb_regs.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#define SSB_SDRAM_SWAPPED 0x10000000U /* Byteswapped Physical SDRAM */
|
||||
#define SSB_ENUM_BASE 0x18000000U /* Enumeration space base */
|
||||
#define SSB_ENUM_LIMIT 0x18010000U /* Enumeration space limit */
|
||||
+#define SSB_AI_BASE 0x18100000 /* base for AI registers */
|
||||
|
||||
#define SSB_FLASH2 0x1c000000U /* Flash Region 2 (region 1 shadowed here) */
|
||||
#define SSB_FLASH2_SZ 0x02000000U /* Size of Flash Region 2 */
|
||||
@@ -26,6 +27,7 @@
|
||||
#define SSB_EUART (SSB_EXTIF_BASE + 0x00800000)
|
||||
#define SSB_LED (SSB_EXTIF_BASE + 0x00900000)
|
||||
|
||||
+#define SSB_EROM_ASD_SZ_BASE 0x00001000
|
||||
|
||||
/* Enumeration space constants */
|
||||
#define SSB_CORE_SIZE 0x1000 /* Size of a core MMIO area */
|
||||
@@ -499,5 +501,41 @@ enum {
|
||||
#define SSB_ADM_BASE2 0xFFFF0000 /* Type2 base address for the core */
|
||||
#define SSB_ADM_BASE2_SHIFT 16
|
||||
|
||||
+/***** EROM defines for AI type busses *****/
|
||||
+#define SSB_EROM_VALID 1
|
||||
+#define SSB_EROM_END 0xe
|
||||
+#define SSB_EROM_TAG 0xe
|
||||
+/* Adress Space Descriptor */
|
||||
+#define SSB_EROM_ASD 0x4
|
||||
+#define SSB_EROM_ASD_SP_MASK 0x00000f00
|
||||
+#define SSB_EROM_ASD_SP_SHIFT 8
|
||||
+#define SSB_EROM_ASD_ST_MASK 0x000000c0
|
||||
+#define SSB_EROM_ASD_ST_SLAVE 0x00000000
|
||||
+#define SSB_EROM_ASD_ST_BRIDGE 0x00000040
|
||||
+#define SSB_EROM_ASD_ST_MWRAP 0x000000c0
|
||||
+#define SSB_EROM_ASD_ST_SWRAP 0x00000080
|
||||
+#define SSB_EROM_ASD_ADDR_MASK 0xfffff000
|
||||
+#define SSB_EROM_ASD_AG32 0x00000008
|
||||
+#define SSB_EROM_ASD_SZ_MASK 0x00000030
|
||||
+#define SSB_EROM_ASD_SZ_SZD 0x00000030
|
||||
+#define SSB_EROM_ASD_SZ_SHIFT 4
|
||||
+#define SSB_EROM_CI 0
|
||||
+#define SSB_EROM_CIA_CID_MASK 0x000fff00
|
||||
+#define SSB_EROM_CIA_CID_SHIFT 8
|
||||
+#define SSB_EROM_CIA_MFG_MASK 0xfff00000
|
||||
+#define SSB_EROM_CIA_MFG_SHIFT 20
|
||||
+#define SSB_EROM_CIB_REV_MASK 0xff000000
|
||||
+#define SSB_EROM_CIB_REV_SHIFT 24
|
||||
+#define SSB_EROM_CIB_NMW_MASK 0x0007c000
|
||||
+#define SSB_EROM_CIB_NSW_MASK 0x00f80000
|
||||
+#define SSB_EROM_CIB_NSP_MASK 0x00003e00
|
||||
+
|
||||
+/***** Registers of AI config space *****/
|
||||
+#define SSB_AI_RESETCTRL 0x800 /* maybe 0x804 for big endian */
|
||||
+#define SSB_AI_RESETCTRL_RESET 1
|
||||
+#define SSB_AI_IOCTRL 0x408 /* maybe 0x40c for big endian */
|
||||
+#define SSB_CF_FGC 0x0002
|
||||
+#define SSB_CF_CLOCK_EN 0x001
|
||||
+#define SSB_AI_oobselouta30 0x100
|
||||
|
||||
#endif /* LINUX_SSB_REGS_H_ */
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/ssb/driver_pcicore.c
|
||||
+++ b/drivers/ssb/driver_pcicore.c
|
||||
@@ -370,7 +370,7 @@ static void ssb_pcicore_init_hostmode(st
|
||||
set_io_port_base(ssb_pcicore_controller.io_map_base);
|
||||
/* Give some time to the PCI controller to configure itself with the new
|
||||
* values. Not waiting at this point causes crashes of the machine. */
|
||||
- mdelay(10);
|
||||
+ mdelay(300);
|
||||
register_pci_controller(&ssb_pcicore_controller);
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
--- a/drivers/ssb/sprom.c
|
||||
+++ b/drivers/ssb/sprom.c
|
||||
@@ -176,6 +176,7 @@ const struct ssb_sprom *ssb_get_fallback
|
||||
{
|
||||
return fallback_sprom;
|
||||
}
|
||||
+EXPORT_SYMBOL(ssb_get_fallback_sprom);
|
||||
|
||||
/* http://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */
|
||||
bool ssb_is_sprom_available(struct ssb_bus *bus)
|
||||
--- a/include/linux/ssb/ssb.h
|
||||
+++ b/include/linux/ssb/ssb.h
|
||||
@@ -412,6 +412,7 @@ extern bool ssb_is_sprom_available(struc
|
||||
/* Set a fallback SPROM.
|
||||
* See kdoc at the function definition for complete documentation. */
|
||||
extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom);
|
||||
+extern const struct ssb_sprom *ssb_get_fallback_sprom(void);
|
||||
|
||||
/* Suspend a SSB bus.
|
||||
* Call this from the parent bus suspend routine. */
|
|
@ -1,22 +0,0 @@
|
|||
--- a/arch/mips/bcm47xx/nvram.c
|
||||
+++ b/arch/mips/bcm47xx/nvram.c
|
||||
@@ -20,7 +20,8 @@
|
||||
#include <asm/mach-bcm47xx/nvram.h>
|
||||
#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
|
||||
-static char nvram_buf[NVRAM_SPACE];
|
||||
+char nvram_buf[NVRAM_SPACE];
|
||||
+EXPORT_SYMBOL(nvram_buf);
|
||||
static int cfe_env;
|
||||
extern char *cfe_env_get(char *nv_buf, const char *name);
|
||||
|
||||
--- a/arch/mips/mm/cache.c
|
||||
+++ b/arch/mips/mm/cache.c
|
||||
@@ -52,6 +52,7 @@ void (*_dma_cache_wback)(unsigned long s
|
||||
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
|
||||
|
||||
EXPORT_SYMBOL(_dma_cache_wback_inv);
|
||||
+EXPORT_SYMBOL(_dma_cache_inv);
|
||||
|
||||
#endif /* CONFIG_DMA_NONCOHERENT */
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,217 +0,0 @@
|
|||
From f49e1efdd179d54e814ff2a8e8f469496583062c Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Tue, 20 Oct 2009 10:54:36 +0100
|
||||
Subject: [PATCH] Squashfs: add LZMA compression
|
||||
|
||||
Add support for LZMA compressed filesystems. This is an initial
|
||||
implementation.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 5 ++
|
||||
fs/squashfs/Makefile | 1 +
|
||||
fs/squashfs/decompressor.c | 4 +
|
||||
fs/squashfs/lzma_wrapper.c | 151 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
fs/squashfs/squashfs.h | 3 +
|
||||
5 files changed, 164 insertions(+), 0 deletions(-)
|
||||
create mode 100644 fs/squashfs/lzma_wrapper.c
|
||||
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -26,6 +26,11 @@ config SQUASHFS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config SQUASHFS_LZMA
|
||||
+ bool "Include support for LZMA compressed file systems"
|
||||
+ depends on SQUASHFS
|
||||
+ select DECOMPRESS_LZMA
|
||||
+
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
bool "Additional option for memory-constrained systems"
|
||||
--- a/fs/squashfs/Makefile
|
||||
+++ b/fs/squashfs/Makefile
|
||||
@@ -5,3 +5,4 @@
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
||||
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
|
||||
+squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o
|
||||
--- a/fs/squashfs/decompressor.c
|
||||
+++ b/fs/squashfs/decompressor.c
|
||||
@@ -50,7 +50,11 @@ static const struct squashfs_decompresso
|
||||
|
||||
static const struct squashfs_decompressor *decompressor[] = {
|
||||
&squashfs_zlib_comp_ops,
|
||||
+#ifdef CONFIG_SQUASHFS_LZMA
|
||||
+ &squashfs_lzma_comp_ops,
|
||||
+#else
|
||||
&squashfs_lzma_unsupported_comp_ops,
|
||||
+#endif
|
||||
&squashfs_lzo_unsupported_comp_ops,
|
||||
&squashfs_unknown_comp_ops
|
||||
};
|
||||
--- /dev/null
|
||||
+++ b/fs/squashfs/lzma_wrapper.c
|
||||
@@ -0,0 +1,152 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
+ *
|
||||
+ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
+ * Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
+ *
|
||||
+ * 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,
|
||||
+ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+ *
|
||||
+ * lzma_wrapper.c
|
||||
+ */
|
||||
+
|
||||
+#include <asm/unaligned.h>
|
||||
+#include <linux/buffer_head.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
+#include <linux/decompress/unlzma.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#include "squashfs_fs.h"
|
||||
+#include "squashfs_fs_sb.h"
|
||||
+#include "squashfs_fs_i.h"
|
||||
+#include "squashfs.h"
|
||||
+#include "decompressor.h"
|
||||
+
|
||||
+struct squashfs_lzma {
|
||||
+ void *input;
|
||||
+ void *output;
|
||||
+};
|
||||
+
|
||||
+/* decompress_unlzma.c is currently non re-entrant... */
|
||||
+DEFINE_MUTEX(lzma_mutex);
|
||||
+
|
||||
+/* decompress_unlzma.c doesn't provide any context in its callbacks... */
|
||||
+static int lzma_error;
|
||||
+
|
||||
+static void error(char *m)
|
||||
+{
|
||||
+ ERROR("unlzma error: %s\n", m);
|
||||
+ lzma_error = 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void *lzma_init(struct squashfs_sb_info *msblk)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = kzalloc(sizeof(*stream), GFP_KERNEL);
|
||||
+ if (stream == NULL)
|
||||
+ goto failed;
|
||||
+ stream->input = vmalloc(msblk->block_size);
|
||||
+ if (stream->input == NULL)
|
||||
+ goto failed;
|
||||
+ stream->output = vmalloc(msblk->block_size);
|
||||
+ if (stream->output == NULL)
|
||||
+ goto failed2;
|
||||
+
|
||||
+ return stream;
|
||||
+
|
||||
+failed2:
|
||||
+ vfree(stream->input);
|
||||
+failed:
|
||||
+ ERROR("failed to allocate lzma workspace\n");
|
||||
+ kfree(stream);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void lzma_free(void *strm)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = strm;
|
||||
+
|
||||
+ if (stream) {
|
||||
+ vfree(stream->input);
|
||||
+ vfree(stream->output);
|
||||
+ }
|
||||
+ kfree(stream);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int lzma_uncompress(struct squashfs_sb_info *msblk, void **buffer,
|
||||
+ struct buffer_head **bh, int b, int offset, int length, int srclength,
|
||||
+ int pages)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = msblk->stream;
|
||||
+ void *buff = stream->input;
|
||||
+ int avail, i, bytes = length, res;
|
||||
+
|
||||
+ mutex_lock(&lzma_mutex);
|
||||
+
|
||||
+ for (i = 0; i < b; i++) {
|
||||
+ wait_on_buffer(bh[i]);
|
||||
+ if (!buffer_uptodate(bh[i]))
|
||||
+ goto block_release;
|
||||
+
|
||||
+ avail = min(bytes, msblk->devblksize - offset);
|
||||
+ memcpy(buff, bh[i]->b_data + offset, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ offset = 0;
|
||||
+ put_bh(bh[i]);
|
||||
+ }
|
||||
+
|
||||
+ lzma_error = 0;
|
||||
+ res = unlzma(stream->input, length, NULL, NULL, stream->output, NULL,
|
||||
+ error);
|
||||
+ if (res || lzma_error)
|
||||
+ goto failed;
|
||||
+
|
||||
+ /* uncompressed size is stored in the LZMA header (5 byte offset) */
|
||||
+ res = bytes = get_unaligned_le32(stream->input + 5);
|
||||
+ for (i = 0, buff = stream->output; bytes && i < pages; i++) {
|
||||
+ avail = min_t(int, bytes, PAGE_CACHE_SIZE);
|
||||
+ memcpy(buffer[i], buff, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ }
|
||||
+ if (bytes)
|
||||
+ goto failed;
|
||||
+
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+ return res;
|
||||
+
|
||||
+block_release:
|
||||
+ for (; i < b; i++)
|
||||
+ put_bh(bh[i]);
|
||||
+
|
||||
+failed:
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+
|
||||
+ ERROR("lzma decompression failed, data probably corrupt\n");
|
||||
+ return -EIO;
|
||||
+}
|
||||
+
|
||||
+const struct squashfs_decompressor squashfs_lzma_comp_ops = {
|
||||
+ .init = lzma_init,
|
||||
+ .free = lzma_free,
|
||||
+ .decompress = lzma_uncompress,
|
||||
+ .id = LZMA_COMPRESSION,
|
||||
+ .name = "lzma",
|
||||
+ .supported = 1
|
||||
+};
|
||||
+
|
||||
--- a/fs/squashfs/squashfs.h
|
||||
+++ b/fs/squashfs/squashfs.h
|
||||
@@ -94,3 +94,6 @@ extern const struct address_space_operat
|
||||
|
||||
/* zlib_wrapper.c */
|
||||
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
|
||||
+
|
||||
+/* lzma wrapper.c */
|
||||
+extern const struct squashfs_decompressor squashfs_lzma_comp_ops;
|
|
@ -1,165 +0,0 @@
|
|||
From fdf23ed283bc6ef5c25076ce2065f892120ff556 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Thu, 22 Oct 2009 04:57:38 +0100
|
||||
Subject: [PATCH] Squashfs: Make unlzma available to non initramfs/initrd code
|
||||
|
||||
Add a config option DECOMPRESS_LZMA_NEEDED which allows subsystems to
|
||||
specify they need the unlzma code. Normally decompress_unlzma.c is
|
||||
compiled with __init and unlzma is not exported to modules.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 1 +
|
||||
include/linux/decompress/bunzip2_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/inflate_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/mm.h | 3 ---
|
||||
include/linux/decompress/unlzma_mm.h | 20 ++++++++++++++++++++
|
||||
lib/Kconfig | 3 +++
|
||||
lib/decompress_bunzip2.c | 1 +
|
||||
lib/decompress_inflate.c | 1 +
|
||||
lib/decompress_unlzma.c | 5 ++++-
|
||||
9 files changed, 54 insertions(+), 4 deletions(-)
|
||||
create mode 100644 include/linux/decompress/bunzip2_mm.h
|
||||
create mode 100644 include/linux/decompress/inflate_mm.h
|
||||
create mode 100644 include/linux/decompress/unlzma_mm.h
|
||||
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -30,6 +30,7 @@ config SQUASHFS_LZMA
|
||||
bool "Include support for LZMA compressed file systems"
|
||||
depends on SQUASHFS
|
||||
select DECOMPRESS_LZMA
|
||||
+ select DECOMPRESS_LZMA_NEEDED
|
||||
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/bunzip2_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef BUNZIP2_MM_H
|
||||
+#define BUNZIP2_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/inflate_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef INFLATE_MM_H
|
||||
+#define INFLATE_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- a/include/linux/decompress/mm.h
|
||||
+++ b/include/linux/decompress/mm.h
|
||||
@@ -63,8 +63,6 @@ static void free(void *where)
|
||||
|
||||
#define set_error_fn(x)
|
||||
|
||||
-#define INIT
|
||||
-
|
||||
#else /* STATIC */
|
||||
|
||||
/* Code active when compiled standalone for use when loading ramdisk: */
|
||||
@@ -87,7 +85,6 @@ static void free(void *where)
|
||||
static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
-#define INIT __init
|
||||
#define STATIC
|
||||
|
||||
#include <linux/init.h>
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/unlzma_mm.h
|
||||
@@ -0,0 +1,20 @@
|
||||
+#ifndef UNLZMA_MM_H
|
||||
+#define UNLZMA_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
|
||||
+
|
||||
+/* Make it available to non initramfs/initrd code */
|
||||
+#define INIT
|
||||
+#include <linux/module.h>
|
||||
+#else
|
||||
+
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -121,6 +121,9 @@ config DECOMPRESS_LZO
|
||||
select LZO_DECOMPRESS
|
||||
tristate
|
||||
|
||||
+config DECOMPRESS_LZMA_NEEDED
|
||||
+ boolean
|
||||
+
|
||||
#
|
||||
# Generic allocator support is selected if needed
|
||||
#
|
||||
--- a/lib/decompress_bunzip2.c
|
||||
+++ b/lib/decompress_bunzip2.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/bunzip2_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#ifndef INT_MAX
|
||||
--- a/lib/decompress_inflate.c
|
||||
+++ b/lib/decompress_inflate.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/inflate_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define GZIP_IOBUF_SIZE (16*1024)
|
||||
--- a/lib/decompress_unlzma.c
|
||||
+++ b/lib/decompress_unlzma.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/unlzma_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
@@ -531,7 +532,7 @@ static inline void INIT process_bit1(str
|
||||
|
||||
|
||||
|
||||
-STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
|
||||
+STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
@@ -664,4 +665,6 @@ STATIC int INIT decompress(unsigned char
|
||||
{
|
||||
return unlzma(buf, in_len - 4, fill, flush, output, posp, error_fn);
|
||||
}
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
|
||||
+EXPORT_SYMBOL(unlzma);
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +0,0 @@
|
|||
--- a/arch/mips/kernel/head.S
|
||||
+++ b/arch/mips/kernel/head.S
|
||||
@@ -121,6 +121,8 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
+ j kernel_entry
|
||||
+ nop
|
||||
#ifndef CONFIG_NO_EXCEPT_FILL
|
||||
/*
|
||||
* Reserved space for exception handlers.
|
|
@ -1,21 +0,0 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -529,7 +529,7 @@ all: vmlinux
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += -Os
|
||||
else
|
||||
-KBUILD_CFLAGS += -O2
|
||||
+KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch
|
||||
endif
|
||||
|
||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||
@@ -567,6 +567,9 @@ endif
|
||||
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
|
||||
+# improve gcc optimization
|
||||
+CFLAGS += $(call cc-option,-funit-at-a-time,)
|
||||
+
|
||||
# warn about C99 declaration after statement
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/arch/mips/include/asm/system.h
|
||||
+++ b/arch/mips/include/asm/system.h
|
||||
@@ -198,7 +198,7 @@ extern __u64 __xchg_u64_unsupported_on_3
|
||||
#define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels
|
||||
#endif
|
||||
|
||||
-static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
|
||||
+static __always_inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
|
||||
{
|
||||
switch (size) {
|
||||
case 4:
|
|
@ -1,50 +0,0 @@
|
|||
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
@@ -325,6 +325,8 @@ static struct cfi_fixup fixup_table[] =
|
||||
static void cfi_fixup_major_minor(struct cfi_private *cfi,
|
||||
struct cfi_pri_amdstd *extp)
|
||||
{
|
||||
+ // manufacturers defined in include/linux/mtd/cfi.h
|
||||
+
|
||||
if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
|
||||
extp->MajorVersion == '0')
|
||||
extp->MajorVersion = '1';
|
||||
@@ -355,6 +357,9 @@ struct mtd_info *cfi_cmdset_0002(struct
|
||||
mtd->name = map->name;
|
||||
mtd->writesize = 1;
|
||||
|
||||
+ printk(" CFI mfr 0x%08x\n", cfi->mfr); // TODO: Is there a more general place to print this info?
|
||||
+ printk(" CFI id 0x%08x\n", cfi->id);
|
||||
+
|
||||
if (cfi->cfi_mode==CFI_MODE_CFI){
|
||||
unsigned char bootloc;
|
||||
/*
|
||||
@@ -373,16 +378,24 @@ struct mtd_info *cfi_cmdset_0002(struct
|
||||
|
||||
cfi_fixup_major_minor(cfi, extp);
|
||||
|
||||
- if (extp->MajorVersion != '1' ||
|
||||
- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
|
||||
+ // valid primary extension versions are: 1.0, 1.1, 1.2, 1.3
|
||||
+ // see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19 and on
|
||||
+ // http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
|
||||
+ if (extp->MajorVersion < '1' ||
|
||||
+ extp->MajorVersion > '1' ||
|
||||
+ (extp->MajorVersion == '1' && ( extp->MinorVersion < '0' || extp->MinorVersion > '3'))) {
|
||||
printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
|
||||
- "version %c.%c.\n", extp->MajorVersion,
|
||||
- extp->MinorVersion);
|
||||
+ "version %c.%c (0x%02x/0x%02x).\n",
|
||||
+ extp->MajorVersion, extp->MinorVersion,
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
kfree(extp);
|
||||
kfree(mtd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ printk(" Amd/Fujitsu Extended Query version %c.%c.\n",
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
+
|
||||
/* Install our own private info structure */
|
||||
cfi->cmdset_priv = extp;
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
From: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
|
||||
Make devtmpfs available on (embedded) configurations without SHMEM/TMPFS,
|
||||
using ramfs instead.
|
||||
|
||||
Saves ~15KB.
|
||||
|
||||
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
--- a/drivers/base/Kconfig
|
||||
+++ b/drivers/base/Kconfig
|
||||
@@ -18,9 +18,9 @@ config UEVENT_HELPER_PATH
|
||||
|
||||
config DEVTMPFS
|
||||
bool "Maintain a devtmpfs filesystem to mount at /dev"
|
||||
- depends on HOTPLUG && SHMEM && TMPFS
|
||||
+ depends on HOTPLUG
|
||||
help
|
||||
- This creates a tmpfs filesystem instance early at bootup.
|
||||
+ This creates a tmpfs/ramfs filesystem instance early at bootup.
|
||||
In this filesystem, the kernel driver core maintains device
|
||||
nodes with their default names and permissions for all
|
||||
registered devices with an assigned major/minor number.
|
||||
@@ -33,6 +33,9 @@ config DEVTMPFS
|
||||
functional /dev without any further help. It also allows simple
|
||||
rescue systems, and reliably handles dynamic major/minor numbers.
|
||||
|
||||
+ Notice: if CONFIG_TMPFS isn't enabled, the simpler ramfs
|
||||
+ file system will be used instead.
|
||||
+
|
||||
config DEVTMPFS_MOUNT
|
||||
bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
|
||||
depends on DEVTMPFS
|
||||
--- a/drivers/base/devtmpfs.c
|
||||
+++ b/drivers/base/devtmpfs.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/namei.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/shmem_fs.h>
|
||||
+#include <linux/ramfs.h>
|
||||
#include <linux/cred.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/init_task.h>
|
||||
@@ -45,7 +46,11 @@ __setup("devtmpfs.mount=", mount_param);
|
||||
static int dev_get_sb(struct file_system_type *fs_type, int flags,
|
||||
const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
{
|
||||
+#ifdef CONFIG_TMPFS
|
||||
return get_sb_single(fs_type, flags, data, shmem_fill_super, mnt);
|
||||
+#else
|
||||
+ return get_sb_single(fs_type, flags, data, ramfs_fill_super, mnt);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct file_system_type dev_fs_type = {
|
||||
--- a/fs/ramfs/inode.c
|
||||
+++ b/fs/ramfs/inode.c
|
||||
@@ -214,7 +214,7 @@ static int ramfs_parse_options(char *dat
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
|
||||
+int ramfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
struct ramfs_fs_info *fsi;
|
||||
struct inode *inode = NULL;
|
||||
--- a/include/linux/ramfs.h
|
||||
+++ b/include/linux/ramfs.h
|
||||
@@ -20,4 +20,6 @@ extern const struct file_operations ramf
|
||||
extern const struct vm_operations_struct generic_file_vm_ops;
|
||||
extern int __init init_rootfs(void);
|
||||
|
||||
+int ramfs_fill_super(struct super_block *sb, void *data, int silent);
|
||||
+
|
||||
#endif
|
|
@ -1,208 +0,0 @@
|
|||
--- /dev/null
|
||||
+++ b/arch/mips/include/asm/mips_machine.h
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published
|
||||
+ * by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ASM_MIPS_MACHINE_H
|
||||
+#define __ASM_MIPS_MACHINE_H
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/list.h>
|
||||
+
|
||||
+#include <asm/bootinfo.h>
|
||||
+
|
||||
+struct mips_machine {
|
||||
+ unsigned long mach_type;
|
||||
+ const char *mach_id;
|
||||
+ const char *mach_name;
|
||||
+ void (*mach_setup)(void);
|
||||
+};
|
||||
+
|
||||
+#define MIPS_MACHINE(_type, _id, _name, _setup) \
|
||||
+static const char machine_name_##_type[] __initconst \
|
||||
+ __aligned(1) = _name; \
|
||||
+static const char machine_id_##_type[] __initconst \
|
||||
+ __aligned(1) = _id; \
|
||||
+static struct mips_machine machine_##_type \
|
||||
+ __used __section(.mips.machines.init) = \
|
||||
+{ \
|
||||
+ .mach_type = _type, \
|
||||
+ .mach_id = machine_id_##_type, \
|
||||
+ .mach_name = machine_name_##_type, \
|
||||
+ .mach_setup = _setup, \
|
||||
+};
|
||||
+
|
||||
+extern long __mips_machines_start;
|
||||
+extern long __mips_machines_end;
|
||||
+
|
||||
+#ifdef CONFIG_MIPS_MACHINE
|
||||
+int mips_machtype_setup(char *id) __init;
|
||||
+void mips_machine_setup(void) __init;
|
||||
+void mips_set_machine_name(const char *name) __init;
|
||||
+char *mips_get_machine_name(void);
|
||||
+#else
|
||||
+static inline int mips_machtype_setup(char *id) { return 1; }
|
||||
+static inline void mips_machine_setup(void) { }
|
||||
+static inline void mips_set_machine_name(const char *name) { }
|
||||
+static inline char *mips_get_machine_name(void) { return NULL; }
|
||||
+#endif /* CONFIG_MIPS_MACHINE */
|
||||
+
|
||||
+#endif /* __ASM_MIPS_MACHINE_H */
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/kernel/mips_machine.c
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published
|
||||
+ * by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#include <asm/mips_machine.h>
|
||||
+
|
||||
+static struct mips_machine *mips_machine __initdata;
|
||||
+static char *mips_machine_name = "Unknown";
|
||||
+
|
||||
+#define for_each_machine(mach) \
|
||||
+ for ((mach) = (struct mips_machine *)&__mips_machines_start; \
|
||||
+ (mach) && \
|
||||
+ (unsigned long)(mach) < (unsigned long)&__mips_machines_end; \
|
||||
+ (mach)++)
|
||||
+
|
||||
+__init void mips_set_machine_name(const char *name)
|
||||
+{
|
||||
+ char *p;
|
||||
+
|
||||
+ if (name == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ p = kstrdup(name, GFP_KERNEL);
|
||||
+ if (!p)
|
||||
+ pr_err("MIPS: no memory for machine_name\n");
|
||||
+
|
||||
+ mips_machine_name = p;
|
||||
+}
|
||||
+
|
||||
+char *mips_get_machine_name(void)
|
||||
+{
|
||||
+ return mips_machine_name;
|
||||
+}
|
||||
+
|
||||
+__init int mips_machtype_setup(char *id)
|
||||
+{
|
||||
+ struct mips_machine *mach;
|
||||
+
|
||||
+ for_each_machine(mach) {
|
||||
+ if (mach->mach_id == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ if (strcmp(mach->mach_id, id) == 0) {
|
||||
+ mips_machtype = mach->mach_type;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pr_err("MIPS: no machine found for id '%s', supported machines:\n", id);
|
||||
+ pr_err("%-24s : %s\n", "id", "name");
|
||||
+ for_each_machine(mach)
|
||||
+ pr_err("%-24s : %s\n", mach->mach_id, mach->mach_name);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+__setup("machtype=", mips_machtype_setup);
|
||||
+
|
||||
+__init void mips_machine_setup(void)
|
||||
+{
|
||||
+ struct mips_machine *mach;
|
||||
+
|
||||
+ for_each_machine(mach) {
|
||||
+ if (mips_machtype == mach->mach_type) {
|
||||
+ mips_machine = mach;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!mips_machine)
|
||||
+ return;
|
||||
+
|
||||
+ mips_set_machine_name(mips_machine->mach_name);
|
||||
+ pr_info("MIPS: machine is %s\n", mips_machine_name);
|
||||
+
|
||||
+ if (mips_machine->mach_setup)
|
||||
+ mips_machine->mach_setup();
|
||||
+}
|
||||
--- a/arch/mips/kernel/Makefile
|
||||
+++ b/arch/mips/kernel/Makefile
|
||||
@@ -94,6 +94,7 @@ obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o
|
||||
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
obj-$(CONFIG_SPINLOCK_TEST) += spinlock_test.o
|
||||
+obj-$(CONFIG_MIPS_MACHINE) += mips_machine.o
|
||||
|
||||
CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
|
||||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -853,6 +853,9 @@ config MIPS_DISABLE_OBSOLETE_IDE
|
||||
config SYNC_R4K
|
||||
bool
|
||||
|
||||
+config MIPS_MACHINE
|
||||
+ def_bool n
|
||||
+
|
||||
config NO_IOPORT
|
||||
def_bool n
|
||||
|
||||
--- a/arch/mips/kernel/proc.c
|
||||
+++ b/arch/mips/kernel/proc.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/processor.h>
|
||||
+#include <asm/mips_machine.h>
|
||||
|
||||
unsigned int vced_count, vcei_count;
|
||||
|
||||
@@ -31,8 +32,12 @@ static int show_cpuinfo(struct seq_file
|
||||
/*
|
||||
* For the first processor also print the system type
|
||||
*/
|
||||
- if (n == 0)
|
||||
+ if (n == 0) {
|
||||
seq_printf(m, "system type\t\t: %s\n", get_system_type());
|
||||
+ if (mips_get_machine_name())
|
||||
+ seq_printf(m, "machine\t\t\t: %s\n",
|
||||
+ mips_get_machine_name());
|
||||
+ }
|
||||
|
||||
seq_printf(m, "processor\t\t: %ld\n", n);
|
||||
sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
|
||||
--- a/arch/mips/kernel/vmlinux.lds.S
|
||||
+++ b/arch/mips/kernel/vmlinux.lds.S
|
||||
@@ -98,6 +98,13 @@ SECTIONS
|
||||
INIT_TEXT_SECTION(PAGE_SIZE)
|
||||
INIT_DATA_SECTION(16)
|
||||
|
||||
+ . = ALIGN(4);
|
||||
+ .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
|
||||
+ __mips_machines_start = .;
|
||||
+ *(.mips.machines.init)
|
||||
+ __mips_machines_end = .;
|
||||
+ }
|
||||
+
|
||||
/* .exit.text is discarded at runtime, not link time, to deal with
|
||||
* references from .rodata
|
||||
*/
|
|
@ -1,28 +0,0 @@
|
|||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -856,6 +856,10 @@ config SYNC_R4K
|
||||
config MIPS_MACHINE
|
||||
def_bool n
|
||||
|
||||
+config IMAGE_CMDLINE_HACK
|
||||
+ bool "OpenWrt specific image command line hack"
|
||||
+ default n
|
||||
+
|
||||
config NO_IOPORT
|
||||
def_bool n
|
||||
|
||||
--- a/arch/mips/kernel/head.S
|
||||
+++ b/arch/mips/kernel/head.S
|
||||
@@ -143,6 +143,12 @@ FEXPORT(__kernel_entry)
|
||||
j kernel_entry
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||||
+ .ascii "CMDLINE:"
|
||||
+EXPORT(__image_cmdline)
|
||||
+ .fill 0x400
|
||||
+#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||||
+
|
||||
__REF
|
||||
|
||||
NESTED(kernel_entry, 16, sp) # kernel entry point
|
|
@ -1,18 +0,0 @@
|
|||
--- a/arch/mips/include/asm/thread_info.h
|
||||
+++ b/arch/mips/include/asm/thread_info.h
|
||||
@@ -83,6 +83,7 @@ register struct thread_info *__current_t
|
||||
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
||||
#define THREAD_MASK (THREAD_SIZE - 1UL)
|
||||
|
||||
+#if 0
|
||||
#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
|
||||
|
||||
#ifdef CONFIG_DEBUG_STACK_USAGE
|
||||
@@ -92,6 +93,7 @@ register struct thread_info *__current_t
|
||||
#endif
|
||||
|
||||
#define free_thread_info(info) kfree(info)
|
||||
+#endif
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/arch/mips/kernel/machine_kexec.c
|
||||
+++ b/arch/mips/kernel/machine_kexec.c
|
||||
@@ -52,7 +52,7 @@ machine_kexec(struct kimage *image)
|
||||
reboot_code_buffer =
|
||||
(unsigned long)page_address(image->control_code_page);
|
||||
|
||||
- kexec_start_address = image->start;
|
||||
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
|
||||
kexec_indirection_page =
|
||||
(unsigned long) phys_to_virt(image->head & PAGE_MASK);
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
MIPS: allow disabling the kernel FPU emulator
|
||||
|
||||
This patch allows turning off the in-kernel Algorithmics
|
||||
FPU emulator support, which allows one to save a couple of
|
||||
precious blocks on an embedded system.
|
||||
|
||||
Signed-off-by: Florian Fainelli <florian@openwrt.org>
|
||||
--
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -841,6 +841,17 @@ config I8259
|
||||
config MIPS_BONITO64
|
||||
bool
|
||||
|
||||
+config MIPS_FPU_EMU
|
||||
+ bool "Enable FPU emulation"
|
||||
+ default y
|
||||
+ help
|
||||
+ This option allows building a kernel with or without the Algorithmics
|
||||
+ FPU emulator enabled. Turning off this option results in a kernel which
|
||||
+ does not catch floating operations exceptions. Make sure that your toolchain
|
||||
+ is configured to enable software floating point emulation in that case.
|
||||
+
|
||||
+ If unsure say Y here.
|
||||
+
|
||||
config MIPS_MSC
|
||||
bool
|
||||
|
||||
--- a/arch/mips/math-emu/Makefile
|
||||
+++ b/arch/mips/math-emu/Makefile
|
||||
@@ -2,12 +2,14 @@
|
||||
# Makefile for the Linux/MIPS kernel FPU emulation.
|
||||
#
|
||||
|
||||
-obj-y := cp1emu.o ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \
|
||||
+obj-y := kernel_linkage.o dsemul.o cp1emu.o
|
||||
+
|
||||
+obj-$(CONFIG_MIPS_FPU_EMU) += ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \
|
||||
ieee754xcpt.o dp_frexp.o dp_modf.o dp_div.o dp_mul.o dp_sub.o \
|
||||
dp_add.o dp_fsp.o dp_cmp.o dp_logb.o dp_scalb.o dp_simple.o \
|
||||
dp_tint.o dp_fint.o dp_tlong.o dp_flong.o sp_frexp.o sp_modf.o \
|
||||
sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_logb.o \
|
||||
sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \
|
||||
- dp_sqrt.o sp_sqrt.o kernel_linkage.o dsemul.o
|
||||
+ dp_sqrt.o sp_sqrt.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
--- a/arch/mips/math-emu/cp1emu.c
|
||||
+++ b/arch/mips/math-emu/cp1emu.c
|
||||
@@ -58,7 +58,11 @@
|
||||
#define __mips 4
|
||||
|
||||
/* Function which emulates a floating point instruction. */
|
||||
+#ifdef CONFIG_DEBUG_FS
|
||||
+DEFINE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
|
||||
+#endif
|
||||
|
||||
+#ifdef CONFIG_MIPS_FPU_EMU
|
||||
static int fpu_emu(struct pt_regs *, struct mips_fpu_struct *,
|
||||
mips_instruction);
|
||||
|
||||
@@ -69,10 +73,6 @@ static int fpux_emu(struct pt_regs *,
|
||||
|
||||
/* Further private data for which no space exists in mips_fpu_struct */
|
||||
|
||||
-#ifdef CONFIG_DEBUG_FS
|
||||
-DEFINE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
|
||||
-#endif
|
||||
-
|
||||
/* Control registers */
|
||||
|
||||
#define FPCREG_RID 0 /* $0 = revision id */
|
||||
@@ -1284,7 +1284,6 @@ int fpu_emulator_cop1Handler(struct pt_r
|
||||
|
||||
return sig;
|
||||
}
|
||||
-
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
static int fpuemu_stat_get(void *data, u64 *val)
|
||||
@@ -1333,4 +1332,11 @@ static int __init debugfs_fpuemu(void)
|
||||
return 0;
|
||||
}
|
||||
__initcall(debugfs_fpuemu);
|
||||
-#endif
|
||||
+#endif /* CONFIG_DEBUGFS */
|
||||
+#else
|
||||
+int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
|
||||
+ int has_fpu)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_MIPS_FPU_EMU */
|
||||
--- a/arch/mips/math-emu/dsemul.c
|
||||
+++ b/arch/mips/math-emu/dsemul.c
|
||||
@@ -109,6 +109,7 @@ int mips_dsemul(struct pt_regs *regs, mi
|
||||
return SIGILL; /* force out of emulation loop */
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_MIPS_FPU_EMU
|
||||
int do_dsemulret(struct pt_regs *xcp)
|
||||
{
|
||||
struct emuframe __user *fr;
|
||||
@@ -165,3 +166,9 @@ int do_dsemulret(struct pt_regs *xcp)
|
||||
|
||||
return 1;
|
||||
}
|
||||
+#else
|
||||
+int do_dsemulret(struct pt_regs *xcp)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_MIPS_FPU_EMU */
|
||||
--- a/arch/mips/math-emu/kernel_linkage.c
|
||||
+++ b/arch/mips/math-emu/kernel_linkage.c
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#define SIGNALLING_NAN 0x7ff800007ff80000LL
|
||||
|
||||
+#ifdef CONFIG_MIPS_FPU_EMU
|
||||
void fpu_emulator_init_fpu(void)
|
||||
{
|
||||
static int first = 1;
|
||||
@@ -112,4 +113,36 @@ int fpu_emulator_restore_context32(struc
|
||||
|
||||
return err;
|
||||
}
|
||||
-#endif
|
||||
+#endif /* CONFIG_64BIT */
|
||||
+#else
|
||||
+
|
||||
+void fpu_emulator_init_fpu(void)
|
||||
+{
|
||||
+ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain"
|
||||
+ "was compiled with software floating point support (soft-float)\n");
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+int fpu_emulator_save_context(struct sigcontext __user *sc)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int fpu_emulator_restore_context(struct sigcontext __user *sc)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int fpu_emulator_save_context32(struct sigcontext32 __user *sc)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int fpu_emulator_restore_context32(struct sigcontext32 __user *sc)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_64BIT
|
||||
+#endif /* CONFIG_64BIT */
|
||||
+#endif /* CONFIG_MIPS_FPU_EMU */
|
|
@ -1,368 +0,0 @@
|
|||
--- a/arch/mips/Makefile
|
||||
+++ b/arch/mips/Makefile
|
||||
@@ -93,7 +93,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
|
||||
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
|
||||
cflags-y += -msoft-float
|
||||
LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
|
||||
-MODFLAGS += -mlong-calls
|
||||
+MODFLAGS += -mno-long-calls
|
||||
|
||||
cflags-y += -ffreestanding
|
||||
|
||||
--- a/arch/mips/include/asm/module.h
|
||||
+++ b/arch/mips/include/asm/module.h
|
||||
@@ -9,6 +9,11 @@ struct mod_arch_specific {
|
||||
struct list_head dbe_list;
|
||||
const struct exception_table_entry *dbe_start;
|
||||
const struct exception_table_entry *dbe_end;
|
||||
+
|
||||
+ void *phys_plt_tbl;
|
||||
+ void *virt_plt_tbl;
|
||||
+ unsigned int phys_plt_offset;
|
||||
+ unsigned int virt_plt_offset;
|
||||
};
|
||||
|
||||
typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */
|
||||
--- a/arch/mips/kernel/module.c
|
||||
+++ b/arch/mips/kernel/module.c
|
||||
@@ -43,6 +43,117 @@ static struct mips_hi16 *mips_hi16_list;
|
||||
static LIST_HEAD(dbe_list);
|
||||
static DEFINE_SPINLOCK(dbe_lock);
|
||||
|
||||
+/*
|
||||
+ * Get the potential max trampolines size required of the init and
|
||||
+ * non-init sections. Only used if we cannot find enough contiguous
|
||||
+ * physically mapped memory to put the module into.
|
||||
+ */
|
||||
+static unsigned int
|
||||
+get_plt_size(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
|
||||
+ const char *secstrings, unsigned int symindex, bool is_init)
|
||||
+{
|
||||
+ unsigned long ret = 0;
|
||||
+ unsigned int i, j;
|
||||
+ Elf_Sym *syms;
|
||||
+
|
||||
+ /* Everything marked ALLOC (this includes the exported symbols) */
|
||||
+ for (i = 1; i < hdr->e_shnum; ++i) {
|
||||
+ unsigned int info = sechdrs[i].sh_info;
|
||||
+
|
||||
+ if (sechdrs[i].sh_type != SHT_REL
|
||||
+ && sechdrs[i].sh_type != SHT_RELA)
|
||||
+ continue;
|
||||
+
|
||||
+ /* Not a valid relocation section? */
|
||||
+ if (info >= hdr->e_shnum)
|
||||
+ continue;
|
||||
+
|
||||
+ /* Don't bother with non-allocated sections */
|
||||
+ if (!(sechdrs[info].sh_flags & SHF_ALLOC))
|
||||
+ continue;
|
||||
+
|
||||
+ /* If it's called *.init*, and we're not init, we're
|
||||
+ not interested */
|
||||
+ if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0)
|
||||
+ != is_init)
|
||||
+ continue;
|
||||
+
|
||||
+ syms = (Elf_Sym *) sechdrs[symindex].sh_addr;
|
||||
+ if (sechdrs[i].sh_type == SHT_REL) {
|
||||
+ Elf_Mips_Rel *rel = (void *) sechdrs[i].sh_addr;
|
||||
+ unsigned int size = sechdrs[i].sh_size / sizeof(*rel);
|
||||
+
|
||||
+ for (j = 0; j < size; ++j) {
|
||||
+ Elf_Sym *sym;
|
||||
+
|
||||
+ if (ELF_MIPS_R_TYPE(rel[j]) != R_MIPS_26)
|
||||
+ continue;
|
||||
+
|
||||
+ sym = syms + ELF_MIPS_R_SYM(rel[j]);
|
||||
+ if (!is_init && sym->st_shndx != SHN_UNDEF)
|
||||
+ continue;
|
||||
+
|
||||
+ ret += 4 * sizeof(int);
|
||||
+ }
|
||||
+ } else {
|
||||
+ Elf_Mips_Rela *rela = (void *) sechdrs[i].sh_addr;
|
||||
+ unsigned int size = sechdrs[i].sh_size / sizeof(*rela);
|
||||
+
|
||||
+ for (j = 0; j < size; ++j) {
|
||||
+ Elf_Sym *sym;
|
||||
+
|
||||
+ if (ELF_MIPS_R_TYPE(rela[j]) != R_MIPS_26)
|
||||
+ continue;
|
||||
+
|
||||
+ sym = syms + ELF_MIPS_R_SYM(rela[j]);
|
||||
+ if (!is_init && sym->st_shndx != SHN_UNDEF)
|
||||
+ continue;
|
||||
+
|
||||
+ ret += 4 * sizeof(int);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#ifndef MODULE_START
|
||||
+static void *alloc_phys(unsigned long size)
|
||||
+{
|
||||
+ unsigned order;
|
||||
+ struct page *page;
|
||||
+ struct page *p;
|
||||
+
|
||||
+ size = PAGE_ALIGN(size);
|
||||
+ order = get_order(size);
|
||||
+
|
||||
+ page = alloc_pages(GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN |
|
||||
+ __GFP_THISNODE, order);
|
||||
+ if (!page)
|
||||
+ return NULL;
|
||||
+
|
||||
+ split_page(page, order);
|
||||
+
|
||||
+ for (p = page + (size >> PAGE_SHIFT); p < page + (1 << order); ++p)
|
||||
+ __free_page(p);
|
||||
+
|
||||
+ return page_address(page);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static void free_phys(void *ptr, unsigned long size)
|
||||
+{
|
||||
+ struct page *page;
|
||||
+ struct page *end;
|
||||
+
|
||||
+ page = virt_to_page(ptr);
|
||||
+ end = page + (PAGE_ALIGN(size) >> PAGE_SHIFT);
|
||||
+
|
||||
+ for (; page < end; ++page)
|
||||
+ __free_page(page);
|
||||
+}
|
||||
+
|
||||
+
|
||||
void *module_alloc(unsigned long size)
|
||||
{
|
||||
#ifdef MODULE_START
|
||||
@@ -58,21 +169,99 @@ void *module_alloc(unsigned long size)
|
||||
|
||||
return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL);
|
||||
#else
|
||||
+ void *ptr;
|
||||
+
|
||||
if (size == 0)
|
||||
return NULL;
|
||||
- return vmalloc(size);
|
||||
+
|
||||
+ ptr = alloc_phys(size);
|
||||
+
|
||||
+ /* If we failed to allocate physically contiguous memory,
|
||||
+ * fall back to regular vmalloc. The module loader code will
|
||||
+ * create jump tables to handle long jumps */
|
||||
+ if (!ptr)
|
||||
+ return vmalloc(size);
|
||||
+
|
||||
+ return ptr;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline bool is_phys_addr(void *ptr)
|
||||
+{
|
||||
+#ifdef CONFIG_64BIT
|
||||
+ return (KSEGX((unsigned long)ptr) == CKSEG0);
|
||||
+#else
|
||||
+ return (KSEGX(ptr) == KSEG0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Free memory returned from module_alloc */
|
||||
void module_free(struct module *mod, void *module_region)
|
||||
{
|
||||
- vfree(module_region);
|
||||
+ if (is_phys_addr(module_region)) {
|
||||
+ if (mod->module_init == module_region)
|
||||
+ free_phys(module_region, mod->init_size);
|
||||
+ else if (mod->module_core == module_region)
|
||||
+ free_phys(module_region, mod->core_size);
|
||||
+ else
|
||||
+ BUG();
|
||||
+ } else {
|
||||
+ vfree(module_region);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void *__module_alloc(int size, bool phys)
|
||||
+{
|
||||
+ void *ptr;
|
||||
+
|
||||
+ if (phys)
|
||||
+ ptr = kmalloc(size, GFP_KERNEL);
|
||||
+ else
|
||||
+ ptr = vmalloc(size);
|
||||
+ return ptr;
|
||||
+}
|
||||
+
|
||||
+static void __module_free(void *ptr)
|
||||
+{
|
||||
+ if (is_phys_addr(ptr))
|
||||
+ kfree(ptr);
|
||||
+ else
|
||||
+ vfree(ptr);
|
||||
}
|
||||
|
||||
int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
|
||||
char *secstrings, struct module *mod)
|
||||
{
|
||||
+ unsigned int symindex = 0;
|
||||
+ unsigned int core_size, init_size;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 1; i < hdr->e_shnum; i++)
|
||||
+ if (sechdrs[i].sh_type == SHT_SYMTAB)
|
||||
+ symindex = i;
|
||||
+
|
||||
+ core_size = get_plt_size(hdr, sechdrs, secstrings, symindex, false);
|
||||
+ init_size = get_plt_size(hdr, sechdrs, secstrings, symindex, true);
|
||||
+
|
||||
+ mod->arch.phys_plt_offset = 0;
|
||||
+ mod->arch.virt_plt_offset = 0;
|
||||
+ mod->arch.phys_plt_tbl = NULL;
|
||||
+ mod->arch.virt_plt_tbl = NULL;
|
||||
+
|
||||
+ if ((core_size + init_size) == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ mod->arch.phys_plt_tbl = __module_alloc(core_size + init_size, 1);
|
||||
+ if (!mod->arch.phys_plt_tbl)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mod->arch.virt_plt_tbl = __module_alloc(core_size + init_size, 0);
|
||||
+ if (!mod->arch.virt_plt_tbl) {
|
||||
+ __module_free(mod->arch.phys_plt_tbl);
|
||||
+ mod->arch.phys_plt_tbl = NULL;
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -95,28 +284,36 @@ static int apply_r_mips_32_rela(struct m
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
|
||||
+static Elf_Addr add_plt_entry_to(unsigned *plt_offset,
|
||||
+ void *start, Elf_Addr v)
|
||||
{
|
||||
- if (v % 4) {
|
||||
- pr_err("module %s: dangerous R_MIPS_26 REL relocation\n",
|
||||
- me->name);
|
||||
- return -ENOEXEC;
|
||||
- }
|
||||
+ unsigned *tramp = start + *plt_offset;
|
||||
+ *plt_offset += 4 * sizeof(int);
|
||||
|
||||
- if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
|
||||
- printk(KERN_ERR
|
||||
- "module %s: relocation overflow\n",
|
||||
- me->name);
|
||||
- return -ENOEXEC;
|
||||
- }
|
||||
+ /* adjust carry for addiu */
|
||||
+ if (v & 0x00008000)
|
||||
+ v += 0x10000;
|
||||
|
||||
- *location = (*location & ~0x03ffffff) |
|
||||
- ((*location + (v >> 2)) & 0x03ffffff);
|
||||
+ tramp[0] = 0x3c190000 | (v >> 16); /* lui t9, hi16 */
|
||||
+ tramp[1] = 0x27390000 | (v & 0xffff); /* addiu t9, t9, lo16 */
|
||||
+ tramp[2] = 0x03200008; /* jr t9 */
|
||||
+ tramp[3] = 0x00000000; /* nop */
|
||||
|
||||
- return 0;
|
||||
+ return (Elf_Addr) tramp;
|
||||
}
|
||||
|
||||
-static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v)
|
||||
+static Elf_Addr add_plt_entry(struct module *me, void *location, Elf_Addr v)
|
||||
+{
|
||||
+ if (is_phys_addr(location))
|
||||
+ return add_plt_entry_to(&me->arch.phys_plt_offset,
|
||||
+ me->arch.phys_plt_tbl, v);
|
||||
+ else
|
||||
+ return add_plt_entry_to(&me->arch.virt_plt_offset,
|
||||
+ me->arch.virt_plt_tbl, v);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static int set_r_mips_26(struct module *me, u32 *location, u32 ofs, Elf_Addr v)
|
||||
{
|
||||
if (v % 4) {
|
||||
pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n",
|
||||
@@ -125,17 +322,31 @@ static int apply_r_mips_26_rela(struct m
|
||||
}
|
||||
|
||||
if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
|
||||
- printk(KERN_ERR
|
||||
+ v = add_plt_entry(me, location, v + (ofs << 2));
|
||||
+ if (!v) {
|
||||
+ printk(KERN_ERR
|
||||
"module %s: relocation overflow\n",
|
||||
me->name);
|
||||
- return -ENOEXEC;
|
||||
+ return -ENOEXEC;
|
||||
+ }
|
||||
+ ofs = 0;
|
||||
}
|
||||
|
||||
- *location = (*location & ~0x03ffffff) | ((v >> 2) & 0x03ffffff);
|
||||
+ *location = (*location & ~0x03ffffff) | ((ofs + (v >> 2)) & 0x03ffffff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
|
||||
+{
|
||||
+ return set_r_mips_26(me, location, *location & 0x03ffffff, v);
|
||||
+}
|
||||
+
|
||||
+static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v)
|
||||
+{
|
||||
+ return set_r_mips_26(me, location, 0, v);
|
||||
+}
|
||||
+
|
||||
static int apply_r_mips_hi16_rel(struct module *me, u32 *location, Elf_Addr v)
|
||||
{
|
||||
struct mips_hi16 *n;
|
||||
@@ -400,11 +611,32 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
list_add(&me->arch.dbe_list, &dbe_list);
|
||||
spin_unlock_irq(&dbe_lock);
|
||||
}
|
||||
+
|
||||
+ /* Get rid of the fixup trampoline if we're running the module
|
||||
+ * from physically mapped address space */
|
||||
+ if (me->arch.phys_plt_offset == 0) {
|
||||
+ __module_free(me->arch.phys_plt_tbl);
|
||||
+ me->arch.phys_plt_tbl = NULL;
|
||||
+ }
|
||||
+ if (me->arch.virt_plt_offset == 0) {
|
||||
+ __module_free(me->arch.virt_plt_tbl);
|
||||
+ me->arch.virt_plt_tbl = NULL;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
void module_arch_cleanup(struct module *mod)
|
||||
{
|
||||
+ if (mod->arch.phys_plt_tbl) {
|
||||
+ __module_free(mod->arch.phys_plt_tbl);
|
||||
+ mod->arch.phys_plt_tbl = NULL;
|
||||
+ }
|
||||
+ if (mod->arch.virt_plt_tbl) {
|
||||
+ __module_free(mod->arch.virt_plt_tbl);
|
||||
+ mod->arch.virt_plt_tbl = NULL;
|
||||
+ }
|
||||
+
|
||||
spin_lock_irq(&dbe_lock);
|
||||
list_del(&mod->arch.dbe_list);
|
||||
spin_unlock_irq(&dbe_lock);
|
|
@ -1,119 +0,0 @@
|
|||
--- a/include/asm-generic/vmlinux.lds.h
|
||||
+++ b/include/asm-generic/vmlinux.lds.h
|
||||
@@ -52,6 +52,27 @@
|
||||
#define LOAD_OFFSET 0
|
||||
#endif
|
||||
|
||||
+#ifndef SYMTAB_KEEP_STR
|
||||
+#define SYMTAB_KEEP_STR *(__ksymtab_strings.*)
|
||||
+#define SYMTAB_DISCARD_STR
|
||||
+#else
|
||||
+#define SYMTAB_DISCARD_STR *(__ksymtab_strings.*)
|
||||
+#endif
|
||||
+
|
||||
+#ifndef SYMTAB_KEEP
|
||||
+#define SYMTAB_KEEP *(__ksymtab.*)
|
||||
+#define SYMTAB_DISCARD
|
||||
+#else
|
||||
+#define SYMTAB_DISCARD *(__ksymtab.*)
|
||||
+#endif
|
||||
+
|
||||
+#ifndef SYMTAB_KEEP_GPL
|
||||
+#define SYMTAB_KEEP_GPL *(__ksymtab_gpl.*)
|
||||
+#define SYMTAB_DISCARD_GPL
|
||||
+#else
|
||||
+#define SYMTAB_DISCARD_GPL *(__ksymtab_gpl.*)
|
||||
+#endif
|
||||
+
|
||||
#ifndef SYMBOL_PREFIX
|
||||
#define VMLINUX_SYMBOL(sym) sym
|
||||
#else
|
||||
@@ -258,35 +279,35 @@
|
||||
/* Kernel symbol table: Normal symbols */ \
|
||||
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start___ksymtab) = .; \
|
||||
- *(__ksymtab) \
|
||||
+ SYMTAB_KEEP \
|
||||
VMLINUX_SYMBOL(__stop___ksymtab) = .; \
|
||||
} \
|
||||
\
|
||||
/* Kernel symbol table: GPL-only symbols */ \
|
||||
__ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
|
||||
- *(__ksymtab_gpl) \
|
||||
+ SYMTAB_KEEP_GPL \
|
||||
VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
|
||||
} \
|
||||
\
|
||||
/* Kernel symbol table: Normal unused symbols */ \
|
||||
__ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
|
||||
- *(__ksymtab_unused) \
|
||||
+ *(__ksymtab_unused.*) \
|
||||
VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
|
||||
} \
|
||||
\
|
||||
/* Kernel symbol table: GPL-only unused symbols */ \
|
||||
__ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
|
||||
- *(__ksymtab_unused_gpl) \
|
||||
+ *(__ksymtab_unused_gpl.*) \
|
||||
VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
|
||||
} \
|
||||
\
|
||||
/* Kernel symbol table: GPL-future-only symbols */ \
|
||||
__ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
|
||||
- *(__ksymtab_gpl_future) \
|
||||
+ *(__ksymtab_gpl_future.*) \
|
||||
VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
|
||||
} \
|
||||
\
|
||||
@@ -327,7 +348,7 @@
|
||||
\
|
||||
/* Kernel symbol table: strings */ \
|
||||
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
|
||||
- *(__ksymtab_strings) \
|
||||
+ SYMTAB_KEEP_STR \
|
||||
} \
|
||||
\
|
||||
/* __*init sections */ \
|
||||
@@ -642,6 +663,9 @@
|
||||
EXIT_TEXT \
|
||||
EXIT_DATA \
|
||||
EXIT_CALL \
|
||||
+ SYMTAB_DISCARD \
|
||||
+ SYMTAB_DISCARD_GPL \
|
||||
+ SYMTAB_DISCARD_STR \
|
||||
*(.discard) \
|
||||
}
|
||||
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -195,16 +195,24 @@ void *__symbol_get_gpl(const char *symbo
|
||||
#define __CRC_SYMBOL(sym, sec)
|
||||
#endif
|
||||
|
||||
+#ifdef MODULE
|
||||
+#define __EXPORT_SUFFIX(sym)
|
||||
+#else
|
||||
+#define __EXPORT_SUFFIX(sym) "." #sym
|
||||
+#endif
|
||||
+
|
||||
/* For every exported symbol, place a struct in the __ksymtab section */
|
||||
#define __EXPORT_SYMBOL(sym, sec) \
|
||||
extern typeof(sym) sym; \
|
||||
__CRC_SYMBOL(sym, sec) \
|
||||
static const char __kstrtab_##sym[] \
|
||||
- __attribute__((section("__ksymtab_strings"), aligned(1))) \
|
||||
+ __attribute__((section("__ksymtab_strings" \
|
||||
+ __EXPORT_SUFFIX(sym)), aligned(1))) \
|
||||
= MODULE_SYMBOL_PREFIX #sym; \
|
||||
static const struct kernel_symbol __ksymtab_##sym \
|
||||
__used \
|
||||
- __attribute__((section("__ksymtab" sec), unused)) \
|
||||
+ __attribute__((section("__ksymtab" sec \
|
||||
+ __EXPORT_SUFFIX(sym)), unused)) \
|
||||
= { (unsigned long)&sym, __kstrtab_##sym }
|
||||
|
||||
#define EXPORT_SYMBOL(sym) \
|
|
@ -1,13 +0,0 @@
|
|||
--- a/arch/arm/kernel/module.c
|
||||
+++ b/arch/arm/kernel/module.c
|
||||
@@ -121,6 +121,10 @@ apply_relocate(Elf32_Shdr *sechdrs, cons
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
+ if ((IS_ERR_VALUE(sym->st_value) || !sym->st_value) &&
|
||||
+ ELF_ST_BIND(sym->st_info) == STB_WEAK)
|
||||
+ continue;
|
||||
+
|
||||
loc = dstsec->sh_addr + rel->r_offset;
|
||||
|
||||
switch (ELF32_R_TYPE(rel->r_info)) {
|
|
@ -1,43 +0,0 @@
|
|||
--- a/drivers/pci/Kconfig
|
||||
+++ b/drivers/pci/Kconfig
|
||||
@@ -40,6 +40,12 @@ config PCI_STUB
|
||||
|
||||
When in doubt, say N.
|
||||
|
||||
+config PCI_DISABLE_COMMON_QUIRKS
|
||||
+ bool "PCI disable common quirks"
|
||||
+ depends on PCI
|
||||
+ help
|
||||
+ If you don't know what to do here, say N.
|
||||
+
|
||||
config HT_IRQ
|
||||
bool "Interrupts on hypertransport devices"
|
||||
default y
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -91,6 +91,7 @@ static void __devinit quirk_resource_ali
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_resource_alignment);
|
||||
|
||||
+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
|
||||
/* The Mellanox Tavor device gives false positive parity errors
|
||||
* Mark this device with a broken_parity_status, to allow
|
||||
* PCI scanning code to "skip" this now blacklisted device.
|
||||
@@ -1924,7 +1925,9 @@ static void __devinit fixup_rev1_53c810(
|
||||
}
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
|
||||
+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */
|
||||
|
||||
+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
|
||||
/* Enable 1k I/O space granularity on the Intel P64H2 */
|
||||
static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev)
|
||||
{
|
||||
@@ -2580,6 +2583,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
|
||||
|
||||
#endif /* CONFIG_PCI_IOV */
|
||||
+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */
|
||||
|
||||
/*
|
||||
* This is a quirk for the Ricoh MMC controller found as a part of
|
|
@ -1,226 +0,0 @@
|
|||
GCC 4.4.x looks to be adding support for generating out-of-line register
|
||||
saves/restores based on:
|
||||
|
||||
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01678.html
|
||||
|
||||
This breaks the kernel build as we'd have to link with libgcc to get the
|
||||
implementation of the register save/restores.
|
||||
|
||||
To workaround this issue, we just stole the save/restore code from gcc
|
||||
and simplified it down for our needs (integer only). We only do this if
|
||||
PPC32 as gcc makes believe the linker on ppc64 will deal with this and
|
||||
only if CONFIG_CC_OPTIMIZE_FOR_SIZE is set (thus -Os).
|
||||
|
||||
Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
|
||||
---
|
||||
|
||||
If someone using cutting edge toolchains for ppc64 could test and make
|
||||
sure if we enable CONFIG_CC_OPTIMIZE_FOR_SIZE things work that would be
|
||||
nice.
|
||||
|
||||
- k
|
||||
|
||||
arch/powerpc/kernel/misc_32.S | 77 +++++++++++++++++++++++++++
|
||||
arch/powerpc/kernel/ppc_ksyms.c | 111 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 188 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/arch/powerpc/kernel/misc_32.S
|
||||
+++ b/arch/powerpc/kernel/misc_32.S
|
||||
@@ -802,3 +802,80 @@ relocate_new_kernel_end:
|
||||
relocate_new_kernel_size:
|
||||
.long relocate_new_kernel_end - relocate_new_kernel
|
||||
#endif
|
||||
+
|
||||
+#if defined(CONFIG_PPC32) && defined(CONFIG_CC_OPTIMIZE_FOR_SIZE)
|
||||
+/* Routines for saving integer registers, called by the compiler. */
|
||||
+/* Called with r11 pointing to the stack header word of the caller of the */
|
||||
+/* function, just beyond the end of the integer save area. */
|
||||
+
|
||||
+_GLOBAL(_savegpr_14) stw 14,-72(11) /* save gp registers */
|
||||
+_GLOBAL(_savegpr_15) stw 15,-68(11)
|
||||
+_GLOBAL(_savegpr_16) stw 16,-64(11)
|
||||
+_GLOBAL(_savegpr_17) stw 17,-60(11)
|
||||
+_GLOBAL(_savegpr_18) stw 18,-56(11)
|
||||
+_GLOBAL(_savegpr_19) stw 19,-52(11)
|
||||
+_GLOBAL(_savegpr_20) stw 20,-48(11)
|
||||
+_GLOBAL(_savegpr_21) stw 21,-44(11)
|
||||
+_GLOBAL(_savegpr_22) stw 22,-40(11)
|
||||
+_GLOBAL(_savegpr_23) stw 23,-36(11)
|
||||
+_GLOBAL(_savegpr_24) stw 24,-32(11)
|
||||
+_GLOBAL(_savegpr_25) stw 25,-28(11)
|
||||
+_GLOBAL(_savegpr_26) stw 26,-24(11)
|
||||
+_GLOBAL(_savegpr_27) stw 27,-20(11)
|
||||
+_GLOBAL(_savegpr_28) stw 28,-16(11)
|
||||
+_GLOBAL(_savegpr_29) stw 29,-12(11)
|
||||
+_GLOBAL(_savegpr_30) stw 30,-8(11)
|
||||
+_GLOBAL(_savegpr_31) stw 31,-4(11)
|
||||
+ blr
|
||||
+
|
||||
+/* Routines for restoring integer registers, called by the compiler. */
|
||||
+/* Called with r11 pointing to the stack header word of the caller of the */
|
||||
+/* function, just beyond the end of the integer restore area. */
|
||||
+
|
||||
+_GLOBAL(_restgpr_14) lwz 14,-72(11) /* restore gp registers */
|
||||
+_GLOBAL(_restgpr_15) lwz 15,-68(11)
|
||||
+_GLOBAL(_restgpr_16) lwz 16,-64(11)
|
||||
+_GLOBAL(_restgpr_17) lwz 17,-60(11)
|
||||
+_GLOBAL(_restgpr_18) lwz 18,-56(11)
|
||||
+_GLOBAL(_restgpr_19) lwz 19,-52(11)
|
||||
+_GLOBAL(_restgpr_20) lwz 20,-48(11)
|
||||
+_GLOBAL(_restgpr_21) lwz 21,-44(11)
|
||||
+_GLOBAL(_restgpr_22) lwz 22,-40(11)
|
||||
+_GLOBAL(_restgpr_23) lwz 23,-36(11)
|
||||
+_GLOBAL(_restgpr_24) lwz 24,-32(11)
|
||||
+_GLOBAL(_restgpr_25) lwz 25,-28(11)
|
||||
+_GLOBAL(_restgpr_26) lwz 26,-24(11)
|
||||
+_GLOBAL(_restgpr_27) lwz 27,-20(11)
|
||||
+_GLOBAL(_restgpr_28) lwz 28,-16(11)
|
||||
+_GLOBAL(_restgpr_29) lwz 29,-12(11)
|
||||
+_GLOBAL(_restgpr_30) lwz 30,-8(11)
|
||||
+_GLOBAL(_restgpr_31) lwz 31,-4(11)
|
||||
+ blr
|
||||
+
|
||||
+/* Routines for restoring integer registers, called by the compiler. */
|
||||
+/* Called with r11 pointing to the stack header word of the caller of the */
|
||||
+/* function, just beyond the end of the integer restore area. */
|
||||
+
|
||||
+_GLOBAL(_restgpr_14_x) lwz 14,-72(11) /* restore gp registers */
|
||||
+_GLOBAL(_restgpr_15_x) lwz 15,-68(11)
|
||||
+_GLOBAL(_restgpr_16_x) lwz 16,-64(11)
|
||||
+_GLOBAL(_restgpr_17_x) lwz 17,-60(11)
|
||||
+_GLOBAL(_restgpr_18_x) lwz 18,-56(11)
|
||||
+_GLOBAL(_restgpr_19_x) lwz 19,-52(11)
|
||||
+_GLOBAL(_restgpr_20_x) lwz 20,-48(11)
|
||||
+_GLOBAL(_restgpr_21_x) lwz 21,-44(11)
|
||||
+_GLOBAL(_restgpr_22_x) lwz 22,-40(11)
|
||||
+_GLOBAL(_restgpr_23_x) lwz 23,-36(11)
|
||||
+_GLOBAL(_restgpr_24_x) lwz 24,-32(11)
|
||||
+_GLOBAL(_restgpr_25_x) lwz 25,-28(11)
|
||||
+_GLOBAL(_restgpr_26_x) lwz 26,-24(11)
|
||||
+_GLOBAL(_restgpr_27_x) lwz 27,-20(11)
|
||||
+_GLOBAL(_restgpr_28_x) lwz 28,-16(11)
|
||||
+_GLOBAL(_restgpr_29_x) lwz 29,-12(11)
|
||||
+_GLOBAL(_restgpr_30_x) lwz 30,-8(11)
|
||||
+_GLOBAL(_restgpr_31_x) lwz 0,4(11)
|
||||
+ lwz 31,-4(11)
|
||||
+ mtlr 0
|
||||
+ mr 1,11
|
||||
+ blr
|
||||
+#endif
|
||||
--- a/arch/powerpc/kernel/ppc_ksyms.c
|
||||
+++ b/arch/powerpc/kernel/ppc_ksyms.c
|
||||
@@ -186,3 +186,114 @@ EXPORT_SYMBOL(__mtdcr);
|
||||
EXPORT_SYMBOL(__mfdcr);
|
||||
#endif
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
+
|
||||
+#if defined(CONFIG_PPC32) && defined(CONFIG_CC_OPTIMIZE_FOR_SIZE)
|
||||
+void _savegpr_14(void);
|
||||
+void _savegpr_15(void);
|
||||
+void _savegpr_16(void);
|
||||
+void _savegpr_17(void);
|
||||
+void _savegpr_18(void);
|
||||
+void _savegpr_19(void);
|
||||
+void _savegpr_20(void);
|
||||
+void _savegpr_21(void);
|
||||
+void _savegpr_22(void);
|
||||
+void _savegpr_23(void);
|
||||
+void _savegpr_24(void);
|
||||
+void _savegpr_25(void);
|
||||
+void _savegpr_26(void);
|
||||
+void _savegpr_27(void);
|
||||
+void _savegpr_28(void);
|
||||
+void _savegpr_29(void);
|
||||
+void _savegpr_30(void);
|
||||
+void _savegpr_31(void);
|
||||
+void _restgpr_14(void);
|
||||
+void _restgpr_15(void);
|
||||
+void _restgpr_16(void);
|
||||
+void _restgpr_17(void);
|
||||
+void _restgpr_18(void);
|
||||
+void _restgpr_19(void);
|
||||
+void _restgpr_20(void);
|
||||
+void _restgpr_21(void);
|
||||
+void _restgpr_22(void);
|
||||
+void _restgpr_23(void);
|
||||
+void _restgpr_24(void);
|
||||
+void _restgpr_25(void);
|
||||
+void _restgpr_26(void);
|
||||
+void _restgpr_27(void);
|
||||
+void _restgpr_28(void);
|
||||
+void _restgpr_29(void);
|
||||
+void _restgpr_30(void);
|
||||
+void _restgpr_31(void);
|
||||
+void _restgpr_14_x(void);
|
||||
+void _restgpr_15_x(void);
|
||||
+void _restgpr_16_x(void);
|
||||
+void _restgpr_17_x(void);
|
||||
+void _restgpr_18_x(void);
|
||||
+void _restgpr_19_x(void);
|
||||
+void _restgpr_20_x(void);
|
||||
+void _restgpr_21_x(void);
|
||||
+void _restgpr_22_x(void);
|
||||
+void _restgpr_23_x(void);
|
||||
+void _restgpr_24_x(void);
|
||||
+void _restgpr_25_x(void);
|
||||
+void _restgpr_26_x(void);
|
||||
+void _restgpr_27_x(void);
|
||||
+void _restgpr_28_x(void);
|
||||
+void _restgpr_29_x(void);
|
||||
+void _restgpr_30_x(void);
|
||||
+void _restgpr_31_x(void);
|
||||
+EXPORT_SYMBOL(_savegpr_14);
|
||||
+EXPORT_SYMBOL(_savegpr_15);
|
||||
+EXPORT_SYMBOL(_savegpr_16);
|
||||
+EXPORT_SYMBOL(_savegpr_17);
|
||||
+EXPORT_SYMBOL(_savegpr_18);
|
||||
+EXPORT_SYMBOL(_savegpr_19);
|
||||
+EXPORT_SYMBOL(_savegpr_20);
|
||||
+EXPORT_SYMBOL(_savegpr_21);
|
||||
+EXPORT_SYMBOL(_savegpr_22);
|
||||
+EXPORT_SYMBOL(_savegpr_23);
|
||||
+EXPORT_SYMBOL(_savegpr_24);
|
||||
+EXPORT_SYMBOL(_savegpr_25);
|
||||
+EXPORT_SYMBOL(_savegpr_26);
|
||||
+EXPORT_SYMBOL(_savegpr_27);
|
||||
+EXPORT_SYMBOL(_savegpr_28);
|
||||
+EXPORT_SYMBOL(_savegpr_29);
|
||||
+EXPORT_SYMBOL(_savegpr_30);
|
||||
+EXPORT_SYMBOL(_savegpr_31);
|
||||
+EXPORT_SYMBOL(_restgpr_14);
|
||||
+EXPORT_SYMBOL(_restgpr_15);
|
||||
+EXPORT_SYMBOL(_restgpr_16);
|
||||
+EXPORT_SYMBOL(_restgpr_17);
|
||||
+EXPORT_SYMBOL(_restgpr_18);
|
||||
+EXPORT_SYMBOL(_restgpr_19);
|
||||
+EXPORT_SYMBOL(_restgpr_20);
|
||||
+EXPORT_SYMBOL(_restgpr_21);
|
||||
+EXPORT_SYMBOL(_restgpr_22);
|
||||
+EXPORT_SYMBOL(_restgpr_23);
|
||||
+EXPORT_SYMBOL(_restgpr_24);
|
||||
+EXPORT_SYMBOL(_restgpr_25);
|
||||
+EXPORT_SYMBOL(_restgpr_26);
|
||||
+EXPORT_SYMBOL(_restgpr_27);
|
||||
+EXPORT_SYMBOL(_restgpr_28);
|
||||
+EXPORT_SYMBOL(_restgpr_29);
|
||||
+EXPORT_SYMBOL(_restgpr_30);
|
||||
+EXPORT_SYMBOL(_restgpr_31);
|
||||
+EXPORT_SYMBOL(_restgpr_14_x);
|
||||
+EXPORT_SYMBOL(_restgpr_15_x);
|
||||
+EXPORT_SYMBOL(_restgpr_16_x);
|
||||
+EXPORT_SYMBOL(_restgpr_17_x);
|
||||
+EXPORT_SYMBOL(_restgpr_18_x);
|
||||
+EXPORT_SYMBOL(_restgpr_19_x);
|
||||
+EXPORT_SYMBOL(_restgpr_20_x);
|
||||
+EXPORT_SYMBOL(_restgpr_21_x);
|
||||
+EXPORT_SYMBOL(_restgpr_22_x);
|
||||
+EXPORT_SYMBOL(_restgpr_23_x);
|
||||
+EXPORT_SYMBOL(_restgpr_24_x);
|
||||
+EXPORT_SYMBOL(_restgpr_25_x);
|
||||
+EXPORT_SYMBOL(_restgpr_26_x);
|
||||
+EXPORT_SYMBOL(_restgpr_27_x);
|
||||
+EXPORT_SYMBOL(_restgpr_28_x);
|
||||
+EXPORT_SYMBOL(_restgpr_29_x);
|
||||
+EXPORT_SYMBOL(_restgpr_30_x);
|
||||
+EXPORT_SYMBOL(_restgpr_31_x);
|
||||
+#endif /* CONFIG_PPC32 && CONFIG_CC_OPTIMIZE_FOR_SIZE */
|
|
@ -1,720 +0,0 @@
|
|||
--- a/arch/arm/tools/mach-types
|
||||
+++ b/arch/arm/tools/mach-types
|
||||
@@ -12,7 +12,7 @@
|
||||
#
|
||||
# http://www.arm.linux.org.uk/developer/machines/?action=new
|
||||
#
|
||||
-# Last update: Sat May 1 10:36:42 2010
|
||||
+# Last update: Wed Feb 2 22:46:11 2011
|
||||
#
|
||||
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
|
||||
#
|
||||
@@ -1319,7 +1319,7 @@ mistral MACH_MISTRAL MISTRAL 1315
|
||||
msm MACH_MSM MSM 1316
|
||||
ct5910 MACH_CT5910 CT5910 1317
|
||||
ct5912 MACH_CT5912 CT5912 1318
|
||||
-hynet_ine MACH_HYNET_INE HYNET_INE 1319
|
||||
+argonst_mp MACH_HYNET_INE HYNET_INE 1319
|
||||
hynet_app MACH_HYNET_APP HYNET_APP 1320
|
||||
msm7200 MACH_MSM7200 MSM7200 1321
|
||||
msm7600 MACH_MSM7600 MSM7600 1322
|
||||
@@ -1777,7 +1777,7 @@ wdg002 MACH_WDG002 WDG002 1785
|
||||
sg560adsl MACH_SG560ADSL SG560ADSL 1786
|
||||
nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787
|
||||
dove_db MACH_DOVE_DB DOVE_DB 1788
|
||||
-marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
|
||||
+dove_avng MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
|
||||
vandihud MACH_VANDIHUD VANDIHUD 1790
|
||||
magx_e8 MACH_MAGX_E8 MAGX_E8 1791
|
||||
magx_z6 MACH_MAGX_Z6 MAGX_Z6 1792
|
||||
@@ -1877,7 +1877,7 @@ ued MACH_UED UED 1885
|
||||
esiblade MACH_ESIBLADE ESIBLADE 1886
|
||||
eye02 MACH_EYE02 EYE02 1887
|
||||
imx27kbd MACH_IMX27KBD IMX27KBD 1888
|
||||
-sst61vc010_fpga MACH_SST61VC010_FPGA SST61VC010_FPGA 1889
|
||||
+p87_fpga MACH_SST61VC010_FPGA SST61VC010_FPGA 1889
|
||||
kixvp435 MACH_KIXVP435 KIXVP435 1890
|
||||
kixnp435 MACH_KIXNP435 KIXNP435 1891
|
||||
africa MACH_AFRICA AFRICA 1892
|
||||
@@ -1994,7 +1994,7 @@ spark MACH_SPARK SPARK 2002
|
||||
benzina MACH_BENZINA BENZINA 2003
|
||||
blaze MACH_BLAZE BLAZE 2004
|
||||
linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005
|
||||
-htckovsky MACH_HTCVENUS HTCVENUS 2006
|
||||
+htckovsky MACH_HTCKOVSKY HTCKOVSKY 2006
|
||||
sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007
|
||||
hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008
|
||||
sapphira MACH_SAPPHIRA SAPPHIRA 2009
|
||||
@@ -2240,7 +2240,7 @@ arm_ultimator2 MACH_ARM_ULTIMATOR2 ARM_
|
||||
vs_v210 MACH_VS_V210 VS_V210 2252
|
||||
vs_v212 MACH_VS_V212 VS_V212 2253
|
||||
hmt MACH_HMT HMT 2254
|
||||
-suen3 MACH_SUEN3 SUEN3 2255
|
||||
+km_kirkwood MACH_KM_KIRKWOOD KM_KIRKWOOD 2255
|
||||
vesper MACH_VESPER VESPER 2256
|
||||
str9 MACH_STR9 STR9 2257
|
||||
omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258
|
||||
@@ -2308,7 +2308,7 @@ ecac2378 MACH_ECAC2378 ECAC2378 2319
|
||||
tazkiosk MACH_TAZKIOSK TAZKIOSK 2320
|
||||
whiterabbit_mch MACH_WHITERABBIT_MCH WHITERABBIT_MCH 2321
|
||||
sbox9263 MACH_SBOX9263 SBOX9263 2322
|
||||
-oreo MACH_OREO OREO 2323
|
||||
+oreo_camera MACH_OREO OREO 2323
|
||||
smdk6442 MACH_SMDK6442 SMDK6442 2324
|
||||
openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325
|
||||
incredible MACH_INCREDIBLE INCREDIBLE 2326
|
||||
@@ -2321,7 +2321,7 @@ mx31txtr MACH_MX31TXTR MX31TXTR 2332
|
||||
u380 MACH_U380 U380 2333
|
||||
oamp3_hualu MACH_HUALU_BOARD HUALU_BOARD 2334
|
||||
npcmx50 MACH_NPCMX50 NPCMX50 2335
|
||||
-mx51_lange51 MACH_MX51_LANGE51 MX51_LANGE51 2336
|
||||
+mx51_efikamx MACH_MX51_EFIKAMX MX51_EFIKAMX 2336
|
||||
mx51_lange52 MACH_MX51_LANGE52 MX51_LANGE52 2337
|
||||
riom MACH_RIOM RIOM 2338
|
||||
comcas MACH_COMCAS COMCAS 2339
|
||||
@@ -2355,7 +2355,7 @@ at91sam9263cs MACH_AT91SAM9263CS AT91SA
|
||||
csb732 MACH_CSB732 CSB732 2367
|
||||
u8500 MACH_U8500 U8500 2368
|
||||
huqiu MACH_HUQIU HUQIU 2369
|
||||
-mx51_kunlun MACH_MX51_KUNLUN MX51_KUNLUN 2370
|
||||
+mx51_efikasb MACH_MX51_EFIKASB MX51_EFIKASB 2370
|
||||
pmt1g MACH_PMT1G PMT1G 2371
|
||||
htcelf MACH_HTCELF HTCELF 2372
|
||||
armadillo420 MACH_ARMADILLO420 ARMADILLO420 2373
|
||||
@@ -2374,7 +2374,7 @@ sch_m490 MACH_SCH_M490 SCH_M490 2386
|
||||
rbl01 MACH_RBL01 RBL01 2387
|
||||
omnifi MACH_OMNIFI OMNIFI 2388
|
||||
otavalo MACH_OTAVALO OTAVALO 2389
|
||||
-sienna MACH_SIENNA SIENNA 2390
|
||||
+siena MACH_SIENNA SIENNA 2390
|
||||
htc_excalibur_s620 MACH_HTC_EXCALIBUR_S620 HTC_EXCALIBUR_S620 2391
|
||||
htc_opal MACH_HTC_OPAL HTC_OPAL 2392
|
||||
touchbook MACH_TOUCHBOOK TOUCHBOOK 2393
|
||||
@@ -2446,7 +2446,7 @@ siogentoo1 MACH_SIOGENTOO1 SIOGENTOO1
|
||||
siogentoo2 MACH_SIOGENTOO2 SIOGENTOO2 2459
|
||||
sm3k MACH_SM3K SM3K 2460
|
||||
acer_tempo_f900 MACH_ACER_TEMPO_F900 ACER_TEMPO_F900 2461
|
||||
-sst61vc010_dev MACH_SST61VC010_DEV SST61VC010_DEV 2462
|
||||
+p87_dev MACH_SST61VC010_DEV SST61VC010_DEV 2462
|
||||
glittertind MACH_GLITTERTIND GLITTERTIND 2463
|
||||
omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464
|
||||
omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465
|
||||
@@ -2498,7 +2498,7 @@ hiram MACH_HIRAM HIRAM 2510
|
||||
phy3250 MACH_PHY3250 PHY3250 2511
|
||||
ea3250 MACH_EA3250 EA3250 2512
|
||||
fdi3250 MACH_FDI3250 FDI3250 2513
|
||||
-whitestone MACH_WHITESTONE WHITESTONE 2514
|
||||
+htcwhitestone MACH_WHITESTONE WHITESTONE 2514
|
||||
at91sam9263nit MACH_AT91SAM9263NIT AT91SAM9263NIT 2515
|
||||
ccmx51 MACH_CCMX51 CCMX51 2516
|
||||
ccmx51js MACH_CCMX51JS CCMX51JS 2517
|
||||
@@ -2561,7 +2561,7 @@ magnolia2 MACH_MAGNOLIA2 MAGNOLIA2 25
|
||||
emxx MACH_EMXX EMXX 2574
|
||||
outlaw MACH_OUTLAW OUTLAW 2575
|
||||
riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576
|
||||
-riot_vox MACH_RIOT_VOX RIOT_VOX 2577
|
||||
+riot_gx2 MACH_RIOT_VOX RIOT_VOX 2577
|
||||
riot_x37 MACH_RIOT_X37 RIOT_X37 2578
|
||||
mega25mx MACH_MEGA25MX MEGA25MX 2579
|
||||
benzina2 MACH_BENZINA2 BENZINA2 2580
|
||||
@@ -2582,7 +2582,7 @@ omap3_bulldog MACH_OMAP3_BULLDOG OMAP3_
|
||||
pca101 MACH_PCA101 PCA101 2595
|
||||
buzzc MACH_BUZZC BUZZC 2596
|
||||
sasie2 MACH_SASIE2 SASIE2 2597
|
||||
-davinci_cio MACH_DAVINCI_CIO DAVINCI_CIO 2598
|
||||
+davinci_dm6467_cio MACH_DAVINCI_CIO DAVINCI_CIO 2598
|
||||
smartmeter_dl MACH_SMARTMETER_DL SMARTMETER_DL 2599
|
||||
wzl6410 MACH_WZL6410 WZL6410 2600
|
||||
wzl6410m MACH_WZL6410M WZL6410M 2601
|
||||
@@ -2591,7 +2591,7 @@ wzl6410i MACH_WZL6410I WZL6410I 2603
|
||||
spacecom1 MACH_SPACECOM1 SPACECOM1 2604
|
||||
pingu920 MACH_PINGU920 PINGU920 2605
|
||||
bravoc MACH_BRAVOC BRAVOC 2606
|
||||
-cybo2440 MACH_CYBO2440 CYBO2440 2607
|
||||
+mydev MACH_CYBO2440 CYBO2440 2607
|
||||
vdssw MACH_VDSSW VDSSW 2608
|
||||
romulus MACH_ROMULUS ROMULUS 2609
|
||||
omap_magic MACH_OMAP_MAGIC OMAP_MAGIC 2610
|
||||
@@ -2609,7 +2609,7 @@ fujitsu_tvstbsoc1 MACH_FUJITSU_TVSTBSOC1
|
||||
lexikon MACH_LEXIKON LEXIKON 2622
|
||||
mini2440v2 MACH_MINI2440V2 MINI2440V2 2623
|
||||
icontrol MACH_ICONTROL ICONTROL 2624
|
||||
-sheevad MACH_SHEEVAD SHEEVAD 2625
|
||||
+gplugd MACH_SHEEVAD SHEEVAD 2625
|
||||
qsd8x50a_st1_1 MACH_QSD8X50A_ST1_1 QSD8X50A_ST1_1 2626
|
||||
qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627
|
||||
bee MACH_BEE BEE 2628
|
||||
@@ -2622,7 +2622,7 @@ kraken MACH_KRAKEN KRAKEN 2634
|
||||
gw2388 MACH_GW2388 GW2388 2635
|
||||
jadecpu MACH_JADECPU JADECPU 2636
|
||||
carlisle MACH_CARLISLE CARLISLE 2637
|
||||
-lux_sf9 MACH_LUX_SFT9 LUX_SFT9 2638
|
||||
+lux_sf9 MACH_LUX_SF9 LUX_SF9 2638
|
||||
nemid_tb MACH_NEMID_TB NEMID_TB 2639
|
||||
terrier MACH_TERRIER TERRIER 2640
|
||||
turbot MACH_TURBOT TURBOT 2641
|
||||
@@ -2683,7 +2683,7 @@ lkevm MACH_LKEVM LKEVM 2695
|
||||
mw6410 MACH_MW6410 MW6410 2696
|
||||
terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697
|
||||
cpu8000e MACH_CPU8000E CPU8000E 2698
|
||||
-catania MACH_CATANIA CATANIA 2699
|
||||
+catania_s MACH_CATANIA CATANIA 2699
|
||||
tokyo MACH_TOKYO TOKYO 2700
|
||||
msm7201a_surf MACH_MSM7201A_SURF MSM7201A_SURF 2701
|
||||
msm7201a_ffa MACH_MSM7201A_FFA MSM7201A_FFA 2702
|
||||
@@ -2741,7 +2741,7 @@ wbd222 MACH_WBD222 WBD222 2753
|
||||
mt65xx MACH_MT65XX MT65XX 2754
|
||||
msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755
|
||||
msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756
|
||||
-vmc300 MACH_VMC300 VMC300 2757
|
||||
+cvc600 MACH_VMC300 VMC300 2757
|
||||
tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758
|
||||
nanos MACH_NANOS NANOS 2759
|
||||
stamp9g10 MACH_STAMP9G10 STAMP9G10 2760
|
||||
@@ -2750,7 +2750,7 @@ h6053 MACH_H6053 H6053 2762
|
||||
smint01 MACH_SMINT01 SMINT01 2763
|
||||
prtlvt2 MACH_PRTLVT2 PRTLVT2 2764
|
||||
ap420 MACH_AP420 AP420 2765
|
||||
-htcshift MACH_HTCSHIFT HTCSHIFT 2766
|
||||
+htcclio MACH_HTCSHIFT HTCSHIFT 2766
|
||||
davinci_dm365_fc MACH_DAVINCI_DM365_FC DAVINCI_DM365_FC 2767
|
||||
msm8x55_surf MACH_MSM8X55_SURF MSM8X55_SURF 2768
|
||||
msm8x55_ffa MACH_MSM8X55_FFA MSM8X55_FFA 2769
|
||||
@@ -2761,7 +2761,7 @@ oreo_controller MACH_OREO_CONTROLLER OR
|
||||
kopin_models MACH_KOPIN_MODELS KOPIN_MODELS 2774
|
||||
ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775
|
||||
cns3420vb MACH_CNS3420VB CNS3420VB 2776
|
||||
-lpc2 MACH_LPC2 LPC2 2777
|
||||
+lpc_evo MACH_LPC2 LPC2 2777
|
||||
olympus MACH_OLYMPUS OLYMPUS 2778
|
||||
vortex MACH_VORTEX VORTEX 2779
|
||||
s5pc200 MACH_S5PC200 S5PC200 2780
|
||||
@@ -2788,7 +2788,7 @@ ti8168evm MACH_TI8168EVM TI8168EVM 28
|
||||
neocoreomap MACH_NEOCOREOMAP NEOCOREOMAP 2801
|
||||
withings_wbp MACH_WITHINGS_WBP WITHINGS_WBP 2802
|
||||
dbps MACH_DBPS DBPS 2803
|
||||
-sbc9261 MACH_SBC9261 SBC9261 2804
|
||||
+at91sam9261 MACH_SBC9261 SBC9261 2804
|
||||
pcbfp0001 MACH_PCBFP0001 PCBFP0001 2805
|
||||
speedy MACH_SPEEDY SPEEDY 2806
|
||||
chrysaor MACH_CHRYSAOR CHRYSAOR 2807
|
||||
@@ -2804,3 +2804,519 @@ teton_bga MACH_TETON_BGA TETON_BGA 28
|
||||
snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817
|
||||
tam3517 MACH_TAM3517 TAM3517 2818
|
||||
pdc100 MACH_PDC100 PDC100 2819
|
||||
+eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820
|
||||
+eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821
|
||||
+eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822
|
||||
+eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823
|
||||
+p565 MACH_P565 P565 2824
|
||||
+acer_a4 MACH_ACER_A4 ACER_A4 2825
|
||||
+davinci_dm368_bip MACH_DAVINCI_DM368_BIP DAVINCI_DM368_BIP 2826
|
||||
+eshare MACH_ESHARE ESHARE 2827
|
||||
+omapl138_europa MACH_HW_OMAPL138_EUROPA HW_OMAPL138_EUROPA 2828
|
||||
+wlbargn MACH_WLBARGN WLBARGN 2829
|
||||
+bm170 MACH_BM170 BM170 2830
|
||||
+netspace_mini_v2 MACH_NETSPACE_MINI_V2 NETSPACE_MINI_V2 2831
|
||||
+netspace_plug_v2 MACH_NETSPACE_PLUG_V2 NETSPACE_PLUG_V2 2832
|
||||
+siemens_l1 MACH_SIEMENS_L1 SIEMENS_L1 2833
|
||||
+elv_lcu1 MACH_ELV_LCU1 ELV_LCU1 2834
|
||||
+mcu1 MACH_MCU1 MCU1 2835
|
||||
+omap3_tao3530 MACH_OMAP3_TAO3530 OMAP3_TAO3530 2836
|
||||
+omap3_pcutouch MACH_OMAP3_PCUTOUCH OMAP3_PCUTOUCH 2837
|
||||
+smdkc210 MACH_SMDKC210 SMDKC210 2838
|
||||
+omap3_braillo MACH_OMAP3_BRAILLO OMAP3_BRAILLO 2839
|
||||
+spyplug MACH_SPYPLUG SPYPLUG 2840
|
||||
+ginger MACH_GINGER GINGER 2841
|
||||
+tny_t3530 MACH_TNY_T3530 TNY_T3530 2842
|
||||
+pca102 MACH_PCA102 PCA102 2843
|
||||
+spade MACH_SPADE SPADE 2844
|
||||
+mxc25_topaz MACH_MXC25_TOPAZ MXC25_TOPAZ 2845
|
||||
+t5325 MACH_T5325 T5325 2846
|
||||
+gw2361 MACH_GW2361 GW2361 2847
|
||||
+elog MACH_ELOG ELOG 2848
|
||||
+income MACH_INCOME INCOME 2849
|
||||
+bcm589x MACH_BCM589X BCM589X 2850
|
||||
+etna MACH_ETNA ETNA 2851
|
||||
+hawks MACH_HAWKS HAWKS 2852
|
||||
+meson MACH_MESON MESON 2853
|
||||
+xsbase255 MACH_XSBASE255 XSBASE255 2854
|
||||
+pvm2030 MACH_PVM2030 PVM2030 2855
|
||||
+mioa502 MACH_MIOA502 MIOA502 2856
|
||||
+vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857
|
||||
+vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858
|
||||
+vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859
|
||||
+htc_spv_m700 MACH_HTC_SPV_M700 HTC_SPV_M700 2860
|
||||
+mx257sx MACH_MX257SX MX257SX 2861
|
||||
+goni MACH_GONI GONI 2862
|
||||
+msm8x55_svlte_ffa MACH_MSM8X55_SVLTE_FFA MSM8X55_SVLTE_FFA 2863
|
||||
+msm8x55_svlte_surf MACH_MSM8X55_SVLTE_SURF MSM8X55_SVLTE_SURF 2864
|
||||
+quickstep MACH_QUICKSTEP QUICKSTEP 2865
|
||||
+dmw96 MACH_DMW96 DMW96 2866
|
||||
+hammerhead MACH_HAMMERHEAD HAMMERHEAD 2867
|
||||
+trident MACH_TRIDENT TRIDENT 2868
|
||||
+lightning MACH_LIGHTNING LIGHTNING 2869
|
||||
+iconnect MACH_ICONNECT ICONNECT 2870
|
||||
+autobot MACH_AUTOBOT AUTOBOT 2871
|
||||
+coconut MACH_COCONUT COCONUT 2872
|
||||
+durian MACH_DURIAN DURIAN 2873
|
||||
+cayenne MACH_CAYENNE CAYENNE 2874
|
||||
+fuji MACH_FUJI FUJI 2875
|
||||
+synology_6282 MACH_SYNOLOGY_6282 SYNOLOGY_6282 2876
|
||||
+em1sy MACH_EM1SY EM1SY 2877
|
||||
+m502 MACH_M502 M502 2878
|
||||
+matrix518 MACH_MATRIX518 MATRIX518 2879
|
||||
+tiny_gurnard MACH_TINY_GURNARD TINY_GURNARD 2880
|
||||
+spear1310 MACH_SPEAR1310 SPEAR1310 2881
|
||||
+bv07 MACH_BV07 BV07 2882
|
||||
+mxt_td61 MACH_MXT_TD61 MXT_TD61 2883
|
||||
+openrd_ultimate MACH_OPENRD_ULTIMATE OPENRD_ULTIMATE 2884
|
||||
+devixp MACH_DEVIXP DEVIXP 2885
|
||||
+miccpt MACH_MICCPT MICCPT 2886
|
||||
+mic256 MACH_MIC256 MIC256 2887
|
||||
+as1167 MACH_AS1167 AS1167 2888
|
||||
+omap3_ibiza MACH_OMAP3_IBIZA OMAP3_IBIZA 2889
|
||||
+u5500 MACH_U5500 U5500 2890
|
||||
+davinci_picto MACH_DAVINCI_PICTO DAVINCI_PICTO 2891
|
||||
+mecha MACH_MECHA MECHA 2892
|
||||
+bubba3 MACH_BUBBA3 BUBBA3 2893
|
||||
+pupitre MACH_PUPITRE PUPITRE 2894
|
||||
+tegra_unused MACH_TEGRA_HARMONY TEGRA_HARMONY 2895
|
||||
+tegra_vogue MACH_TEGRA_VOGUE TEGRA_VOGUE 2896
|
||||
+tegra_e1165 MACH_TEGRA_E1165 TEGRA_E1165 2897
|
||||
+simplenet MACH_SIMPLENET SIMPLENET 2898
|
||||
+ec4350tbm MACH_EC4350TBM EC4350TBM 2899
|
||||
+pec_tc MACH_PEC_TC PEC_TC 2900
|
||||
+pec_hc2 MACH_PEC_HC2 PEC_HC2 2901
|
||||
+esl_mobilis_a MACH_ESL_MOBILIS_A ESL_MOBILIS_A 2902
|
||||
+esl_mobilis_b MACH_ESL_MOBILIS_B ESL_MOBILIS_B 2903
|
||||
+esl_wave_a MACH_ESL_WAVE_A ESL_WAVE_A 2904
|
||||
+esl_wave_b MACH_ESL_WAVE_B ESL_WAVE_B 2905
|
||||
+unisense_mmm MACH_UNISENSE_MMM UNISENSE_MMM 2906
|
||||
+blueshark MACH_BLUESHARK BLUESHARK 2907
|
||||
+e10 MACH_E10 E10 2908
|
||||
+app3k_robin MACH_APP3K_ROBIN APP3K_ROBIN 2909
|
||||
+pov15hd MACH_POV15HD POV15HD 2910
|
||||
+stella MACH_STELLA STELLA 2911
|
||||
+htc_iolite MACH_MACH_HTC_IOLITE MACH_HTC_IOLITE 2912
|
||||
+linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913
|
||||
+netwalker MACH_NETWALKER NETWALKER 2914
|
||||
+acsx106 MACH_ACSX106 ACSX106 2915
|
||||
+atlas5_c1 MACH_ATLAS5_C1 ATLAS5_C1 2916
|
||||
+nsb3ast MACH_NSB3AST NSB3AST 2917
|
||||
+gnet_slc MACH_GNET_SLC GNET_SLC 2918
|
||||
+af4000 MACH_AF4000 AF4000 2919
|
||||
+ark9431 MACH_ARK9431 ARK9431 2920
|
||||
+fs_s5pc100 MACH_FS_S5PC100 FS_S5PC100 2921
|
||||
+omap3505nova8 MACH_OMAP3505NOVA8 OMAP3505NOVA8 2922
|
||||
+omap3621_edp1 MACH_OMAP3621_EDP1 OMAP3621_EDP1 2923
|
||||
+oratisaes MACH_ORATISAES ORATISAES 2924
|
||||
+smdkv310 MACH_SMDKV310 SMDKV310 2925
|
||||
+siemens_l0 MACH_SIEMENS_L0 SIEMENS_L0 2926
|
||||
+ventana MACH_VENTANA VENTANA 2927
|
||||
+wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928
|
||||
+ec4350sdb MACH_EC4350SDB EC4350SDB 2929
|
||||
+mimas MACH_MIMAS MIMAS 2930
|
||||
+titan MACH_TITAN TITAN 2931
|
||||
+craneboard MACH_CRANEBOARD CRANEBOARD 2932
|
||||
+es2440 MACH_ES2440 ES2440 2933
|
||||
+najay_a9263 MACH_NAJAY_A9263 NAJAY_A9263 2934
|
||||
+htctornado MACH_HTCTORNADO HTCTORNADO 2935
|
||||
+dimm_mx257 MACH_DIMM_MX257 DIMM_MX257 2936
|
||||
+jigen301 MACH_JIGEN JIGEN 2937
|
||||
+smdk6450 MACH_SMDK6450 SMDK6450 2938
|
||||
+meno_qng MACH_MENO_QNG MENO_QNG 2939
|
||||
+ns2416 MACH_NS2416 NS2416 2940
|
||||
+rpc353 MACH_RPC353 RPC353 2941
|
||||
+tq6410 MACH_TQ6410 TQ6410 2942
|
||||
+sky6410 MACH_SKY6410 SKY6410 2943
|
||||
+dynasty MACH_DYNASTY DYNASTY 2944
|
||||
+vivo MACH_VIVO VIVO 2945
|
||||
+bury_bl7582 MACH_BURY_BL7582 BURY_BL7582 2946
|
||||
+bury_bps5270 MACH_BURY_BPS5270 BURY_BPS5270 2947
|
||||
+basi MACH_BASI BASI 2948
|
||||
+tn200 MACH_TN200 TN200 2949
|
||||
+c2mmi MACH_C2MMI C2MMI 2950
|
||||
+meson_6236m MACH_MESON_6236M MESON_6236M 2951
|
||||
+meson_8626m MACH_MESON_8626M MESON_8626M 2952
|
||||
+tube MACH_TUBE TUBE 2953
|
||||
+messina MACH_MESSINA MESSINA 2954
|
||||
+mx50_arm2 MACH_MX50_ARM2 MX50_ARM2 2955
|
||||
+cetus9263 MACH_CETUS9263 CETUS9263 2956
|
||||
+brownstone MACH_BROWNSTONE BROWNSTONE 2957
|
||||
+vmx25 MACH_VMX25 VMX25 2958
|
||||
+vmx51 MACH_VMX51 VMX51 2959
|
||||
+abacus MACH_ABACUS ABACUS 2960
|
||||
+cm4745 MACH_CM4745 CM4745 2961
|
||||
+oratislink MACH_ORATISLINK ORATISLINK 2962
|
||||
+davinci_dm365_dvr MACH_DAVINCI_DM365_DVR DAVINCI_DM365_DVR 2963
|
||||
+netviz MACH_NETVIZ NETVIZ 2964
|
||||
+flexibity MACH_FLEXIBITY FLEXIBITY 2965
|
||||
+wlan_computer MACH_WLAN_COMPUTER WLAN_COMPUTER 2966
|
||||
+lpc24xx MACH_LPC24XX LPC24XX 2967
|
||||
+spica MACH_SPICA SPICA 2968
|
||||
+gpsdisplay MACH_GPSDISPLAY GPSDISPLAY 2969
|
||||
+bipnet MACH_BIPNET BIPNET 2970
|
||||
+overo_ctu_inertial MACH_OVERO_CTU_INERTIAL OVERO_CTU_INERTIAL 2971
|
||||
+davinci_dm355_mmm MACH_DAVINCI_DM355_MMM DAVINCI_DM355_MMM 2972
|
||||
+pc9260_v2 MACH_PC9260_V2 PC9260_V2 2973
|
||||
+ptx7545 MACH_PTX7545 PTX7545 2974
|
||||
+tm_efdc MACH_TM_EFDC TM_EFDC 2975
|
||||
+remove_me MACH_WALDO1 WALDO1 2976
|
||||
+omap3_waldo1 MACH_OMAP3_WALDO1 OMAP3_WALDO1 2977
|
||||
+flyer MACH_FLYER FLYER 2978
|
||||
+tornado3240 MACH_TORNADO3240 TORNADO3240 2979
|
||||
+soli_01 MACH_SOLI_01 SOLI_01 2980
|
||||
+omapl138_europalc MACH_OMAPL138_EUROPALC OMAPL138_EUROPALC 2981
|
||||
+helios_v1 MACH_HELIOS_V1 HELIOS_V1 2982
|
||||
+netspace_lite_v2 MACH_NETSPACE_LITE_V2 NETSPACE_LITE_V2 2983
|
||||
+ssc MACH_SSC SSC 2984
|
||||
+premierwave_en MACH_PREMIERWAVE_EN PREMIERWAVE_EN 2985
|
||||
+wasabi MACH_WASABI WASABI 2986
|
||||
+vivo_w MACH_VIVOW VIVOW 2987
|
||||
+mx50_rdp MACH_MX50_RDP MX50_RDP 2988
|
||||
+universal_c210 MACH_UNIVERSAL_C210 UNIVERSAL_C210 2989
|
||||
+real6410 MACH_REAL6410 REAL6410 2990
|
||||
+spx_sakura MACH_SPX_SAKURA SPX_SAKURA 2991
|
||||
+ij3k_2440 MACH_IJ3K_2440 IJ3K_2440 2992
|
||||
+omap3_bc10 MACH_OMAP3_BC10 OMAP3_BC10 2993
|
||||
+thebe MACH_THEBE THEBE 2994
|
||||
+rv082 MACH_RV082 RV082 2995
|
||||
+armlguest MACH_ARMLGUEST ARMLGUEST 2996
|
||||
+tjinc1000 MACH_TJINC1000 TJINC1000 2997
|
||||
+dockstar MACH_DOCKSTAR DOCKSTAR 2998
|
||||
+ax8008 MACH_AX8008 AX8008 2999
|
||||
+gnet_sgce MACH_GNET_SGCE GNET_SGCE 3000
|
||||
+pxwnas_500_1000 MACH_PXWNAS_500_1000 PXWNAS_500_1000 3001
|
||||
+ea20 MACH_EA20 EA20 3002
|
||||
+awm2 MACH_AWM2 AWM2 3003
|
||||
+ti8148evm MACH_TI8148EVM TI8148EVM 3004
|
||||
+seaboard MACH_SEABOARD SEABOARD 3005
|
||||
+linkstation_chlv2 MACH_LINKSTATION_CHLV2 LINKSTATION_CHLV2 3006
|
||||
+tera_pro2_rack MACH_TERA_PRO2_RACK TERA_PRO2_RACK 3007
|
||||
+rubys MACH_RUBYS RUBYS 3008
|
||||
+aquarius MACH_AQUARIUS AQUARIUS 3009
|
||||
+mx53_ard MACH_MX53_ARD MX53_ARD 3010
|
||||
+mx53_smd MACH_MX53_SMD MX53_SMD 3011
|
||||
+lswxl MACH_LSWXL LSWXL 3012
|
||||
+dove_avng_v3 MACH_DOVE_AVNG_V3 DOVE_AVNG_V3 3013
|
||||
+sdi_ess_9263 MACH_SDI_ESS_9263 SDI_ESS_9263 3014
|
||||
+jocpu550 MACH_JOCPU550 JOCPU550 3015
|
||||
+msm8x60_rumi3 MACH_MSM8X60_RUMI3 MSM8X60_RUMI3 3016
|
||||
+msm8x60_ffa MACH_MSM8X60_FFA MSM8X60_FFA 3017
|
||||
+yanomami MACH_YANOMAMI YANOMAMI 3018
|
||||
+gta04 MACH_GTA04 GTA04 3019
|
||||
+cm_a510 MACH_CM_A510 CM_A510 3020
|
||||
+omap3_rfs200 MACH_OMAP3_RFS200 OMAP3_RFS200 3021
|
||||
+kx33xx MACH_KX33XX KX33XX 3022
|
||||
+ptx7510 MACH_PTX7510 PTX7510 3023
|
||||
+top9000 MACH_TOP9000 TOP9000 3024
|
||||
+teenote MACH_TEENOTE TEENOTE 3025
|
||||
+ts3 MACH_TS3 TS3 3026
|
||||
+a0 MACH_A0 A0 3027
|
||||
+fsm9xxx_surf MACH_FSM9XXX_SURF FSM9XXX_SURF 3028
|
||||
+fsm9xxx_ffa MACH_FSM9XXX_FFA FSM9XXX_FFA 3029
|
||||
+frrhwcdma60w MACH_FRRHWCDMA60W FRRHWCDMA60W 3030
|
||||
+remus MACH_REMUS REMUS 3031
|
||||
+at91cap7xdk MACH_AT91CAP7XDK AT91CAP7XDK 3032
|
||||
+at91cap7stk MACH_AT91CAP7STK AT91CAP7STK 3033
|
||||
+kt_sbc_sam9_1 MACH_KT_SBC_SAM9_1 KT_SBC_SAM9_1 3034
|
||||
+at91sam9263router MACH_ORATISROUTER ORATISROUTER 3035
|
||||
+armada_xp_db MACH_ARMADA_XP_DB ARMADA_XP_DB 3036
|
||||
+spdm MACH_SPDM SPDM 3037
|
||||
+gtib MACH_GTIB GTIB 3038
|
||||
+dgm3240 MACH_DGM3240 DGM3240 3039
|
||||
+iv_atlas_i_lpe MACH_ATLAS_I_LPE ATLAS_I_LPE 3040
|
||||
+htcmega MACH_HTCMEGA HTCMEGA 3041
|
||||
+tricorder MACH_TRICORDER TRICORDER 3042
|
||||
+tx28 MACH_TX28 TX28 3043
|
||||
+bstbrd MACH_BSTBRD BSTBRD 3044
|
||||
+pwb3090 MACH_PWB3090 PWB3090 3045
|
||||
+idea6410 MACH_IDEA6410 IDEA6410 3046
|
||||
+qbc9263 MACH_QBC9263 QBC9263 3047
|
||||
+borabora MACH_BORABORA BORABORA 3048
|
||||
+valdez MACH_VALDEZ VALDEZ 3049
|
||||
+ls9g20 MACH_LS9G20 LS9G20 3050
|
||||
+mios_v1 MACH_MIOS_V1 MIOS_V1 3051
|
||||
+s5pc110_crespo MACH_S5PC110_CRESPO S5PC110_CRESPO 3052
|
||||
+controltek9g20 MACH_CONTROLTEK9G20 CONTROLTEK9G20 3053
|
||||
+tin307 MACH_TIN307 TIN307 3054
|
||||
+tin510 MACH_TIN510 TIN510 3055
|
||||
+ep3505 MACH_EP3517 EP3517 3056
|
||||
+bluecheese MACH_BLUECHEESE BLUECHEESE 3057
|
||||
+tem3x30 MACH_TEM3X30 TEM3X30 3058
|
||||
+harvest_desoto MACH_HARVEST_DESOTO HARVEST_DESOTO 3059
|
||||
+msm8x60_qrdc MACH_MSM8X60_QRDC MSM8X60_QRDC 3060
|
||||
+spear900 MACH_SPEAR900 SPEAR900 3061
|
||||
+pcontrol_g20 MACH_PCONTROL_G20 PCONTROL_G20 3062
|
||||
+rdstor MACH_RDSTOR RDSTOR 3063
|
||||
+usdloader MACH_USDLOADER USDLOADER 3064
|
||||
+tsoploader MACH_TSOPLOADER TSOPLOADER 3065
|
||||
+kronos MACH_KRONOS KRONOS 3066
|
||||
+ffcore MACH_FFCORE FFCORE 3067
|
||||
+mone MACH_MONE MONE 3068
|
||||
+unit2s MACH_UNIT2S UNIT2S 3069
|
||||
+acer_a5 MACH_ACER_A5 ACER_A5 3070
|
||||
+etherpro_isp MACH_ETHERPRO_ISP ETHERPRO_ISP 3071
|
||||
+stretchs7000 MACH_STRETCHS7000 STRETCHS7000 3072
|
||||
+p87_smartsim MACH_P87_SMARTSIM P87_SMARTSIM 3073
|
||||
+tulip MACH_TULIP TULIP 3074
|
||||
+sunflower MACH_SUNFLOWER SUNFLOWER 3075
|
||||
+rib MACH_RIB RIB 3076
|
||||
+clod MACH_CLOD CLOD 3077
|
||||
+rump MACH_RUMP RUMP 3078
|
||||
+tenderloin MACH_TENDERLOIN TENDERLOIN 3079
|
||||
+shortloin MACH_SHORTLOIN SHORTLOIN 3080
|
||||
+roml1 MACH_CRESPO CRESPO 3081
|
||||
+antares MACH_ANTARES ANTARES 3082
|
||||
+wb40n MACH_WB40N WB40N 3083
|
||||
+herring MACH_HERRING HERRING 3084
|
||||
+naxy400 MACH_NAXY400 NAXY400 3085
|
||||
+naxy1200 MACH_NAXY1200 NAXY1200 3086
|
||||
+vpr200 MACH_VPR200 VPR200 3087
|
||||
+bug20 MACH_BUG20 BUG20 3088
|
||||
+goflexnet MACH_GOFLEXNET GOFLEXNET 3089
|
||||
+torbreck MACH_TORBRECK TORBRECK 3090
|
||||
+saarb_mg1 MACH_SAARB_MG1 SAARB_MG1 3091
|
||||
+callisto MACH_CALLISTO CALLISTO 3092
|
||||
+multhsu MACH_MULTHSU MULTHSU 3093
|
||||
+saluda MACH_SALUDA SALUDA 3094
|
||||
+pemp_omap3_apollo MACH_PEMP_OMAP3_APOLLO PEMP_OMAP3_APOLLO 3095
|
||||
+vc0718 MACH_VC0718 VC0718 3096
|
||||
+mvblx MACH_MVBLX MVBLX 3097
|
||||
+inhand_apeiron MACH_INHAND_APEIRON INHAND_APEIRON 3098
|
||||
+inhand_fury MACH_INHAND_FURY INHAND_FURY 3099
|
||||
+inhand_siren MACH_INHAND_SIREN INHAND_SIREN 3100
|
||||
+hdnvp MACH_HDNVP HDNVP 3101
|
||||
+softwinner MACH_SOFTWINNER SOFTWINNER 3102
|
||||
+prima2_evb MACH_PRIMA2_EVB PRIMA2_EVB 3103
|
||||
+nas6210 MACH_NAS6210 NAS6210 3104
|
||||
+unisdev MACH_UNISDEV UNISDEV 3105
|
||||
+sbca11 MACH_SBCA11 SBCA11 3106
|
||||
+saga MACH_SAGA SAGA 3107
|
||||
+ns_k330 MACH_NS_K330 NS_K330 3108
|
||||
+tanna MACH_TANNA TANNA 3109
|
||||
+imate8502 MACH_IMATE8502 IMATE8502 3110
|
||||
+aspen MACH_ASPEN ASPEN 3111
|
||||
+daintree_cwac MACH_DAINTREE_CWAC DAINTREE_CWAC 3112
|
||||
+zmx25 MACH_ZMX25 ZMX25 3113
|
||||
+maple1 MACH_MAPLE1 MAPLE1 3114
|
||||
+qsd8x72_surf MACH_QSD8X72_SURF QSD8X72_SURF 3115
|
||||
+qsd8x72_ffa MACH_QSD8X72_FFA QSD8X72_FFA 3116
|
||||
+abilene MACH_ABILENE ABILENE 3117
|
||||
+eigen_ttr MACH_EIGEN_TTR EIGEN_TTR 3118
|
||||
+iomega_ix2_200 MACH_IOMEGA_IX2_200 IOMEGA_IX2_200 3119
|
||||
+coretec_vcx7400 MACH_CORETEC_VCX7400 CORETEC_VCX7400 3120
|
||||
+santiago MACH_SANTIAGO SANTIAGO 3121
|
||||
+mx257sol MACH_MX257SOL MX257SOL 3122
|
||||
+strasbourg MACH_STRASBOURG STRASBOURG 3123
|
||||
+msm8x60_fluid MACH_MSM8X60_FLUID MSM8X60_FLUID 3124
|
||||
+smartqv5 MACH_SMARTQV5 SMARTQV5 3125
|
||||
+smartqv3 MACH_SMARTQV3 SMARTQV3 3126
|
||||
+smartqv7 MACH_SMARTQV7 SMARTQV7 3127
|
||||
+tegra_paz00 MACH_PAZ00 PAZ00 3128
|
||||
+acmenetusfoxg20 MACH_ACMENETUSFOXG20 ACMENETUSFOXG20 3129
|
||||
+htc_willow MACH_HTCWILLOW HTCWILLOW 3130
|
||||
+fwbd_0404 MACH_FWBD_0404 FWBD_0404 3131
|
||||
+hdgu MACH_HDGU HDGU 3132
|
||||
+pyramid MACH_PYRAMID PYRAMID 3133
|
||||
+epiphan MACH_EPIPHAN EPIPHAN 3134
|
||||
+omap_bender MACH_OMAP_BENDER OMAP_BENDER 3135
|
||||
+gurnard MACH_GURNARD GURNARD 3136
|
||||
+gtl_it5100 MACH_GTL_IT5100 GTL_IT5100 3137
|
||||
+bcm2708 MACH_BCM2708 BCM2708 3138
|
||||
+mx51_ggc MACH_MX51_GGC MX51_GGC 3139
|
||||
+sharespace MACH_SHARESPACE SHARESPACE 3140
|
||||
+haba_knx_explorer MACH_HABA_KNX_EXPLORER HABA_KNX_EXPLORER 3141
|
||||
+simtec_kirkmod MACH_SIMTEC_KIRKMOD SIMTEC_KIRKMOD 3142
|
||||
+crux MACH_CRUX CRUX 3143
|
||||
+mx51_bravo MACH_MX51_BRAVO MX51_BRAVO 3144
|
||||
+charon MACH_CHARON CHARON 3145
|
||||
+picocom3 MACH_PICOCOM3 PICOCOM3 3146
|
||||
+picocom4 MACH_PICOCOM4 PICOCOM4 3147
|
||||
+serrano MACH_SERRANO SERRANO 3148
|
||||
+doubleshot MACH_DOUBLESHOT DOUBLESHOT 3149
|
||||
+evsy MACH_EVSY EVSY 3150
|
||||
+huashan MACH_HUASHAN HUASHAN 3151
|
||||
+lausanne MACH_LAUSANNE LAUSANNE 3152
|
||||
+emerald MACH_EMERALD EMERALD 3153
|
||||
+tqma35 MACH_TQMA35 TQMA35 3154
|
||||
+marvel MACH_MARVEL MARVEL 3155
|
||||
+manuae MACH_MANUAE MANUAE 3156
|
||||
+chacha MACH_CHACHA CHACHA 3157
|
||||
+lemon MACH_LEMON LEMON 3158
|
||||
+csc MACH_CSC CSC 3159
|
||||
+gira_knxip_router MACH_GIRA_KNXIP_ROUTER GIRA_KNXIP_ROUTER 3160
|
||||
+t20 MACH_T20 T20 3161
|
||||
+hdmini MACH_HDMINI HDMINI 3162
|
||||
+sciphone_g2 MACH_SCIPHONE_G2 SCIPHONE_G2 3163
|
||||
+express MACH_EXPRESS EXPRESS 3164
|
||||
+express_kt MACH_EXPRESS_KT EXPRESS_KT 3165
|
||||
+maximasp MACH_MAXIMASP MAXIMASP 3166
|
||||
+nitrogen_imx51 MACH_NITROGEN_IMX51 NITROGEN_IMX51 3167
|
||||
+nitrogen_imx53 MACH_NITROGEN_IMX53 NITROGEN_IMX53 3168
|
||||
+sunfire MACH_SUNFIRE SUNFIRE 3169
|
||||
+arowana MACH_AROWANA AROWANA 3170
|
||||
+tegra_daytona MACH_TEGRA_DAYTONA TEGRA_DAYTONA 3171
|
||||
+tegra_swordfish MACH_TEGRA_SWORDFISH TEGRA_SWORDFISH 3172
|
||||
+edison MACH_EDISON EDISON 3173
|
||||
+svp8500v1 MACH_SVP8500V1 SVP8500V1 3174
|
||||
+svp8500v2 MACH_SVP8500V2 SVP8500V2 3175
|
||||
+svp5500 MACH_SVP5500 SVP5500 3176
|
||||
+b5500 MACH_B5500 B5500 3177
|
||||
+s5500 MACH_S5500 S5500 3178
|
||||
+icon MACH_ICON ICON 3179
|
||||
+elephant MACH_ELEPHANT ELEPHANT 3180
|
||||
+msm8x60_charm_surf MACH_MSM8X60_FUSION MSM8X60_FUSION 3181
|
||||
+shooter MACH_SHOOTER SHOOTER 3182
|
||||
+spade_lte MACH_SPADE_LTE SPADE_LTE 3183
|
||||
+philhwani MACH_PHILHWANI PHILHWANI 3184
|
||||
+gsncomm MACH_GSNCOMM GSNCOMM 3185
|
||||
+strasbourg_a2 MACH_STRASBOURG_A2 STRASBOURG_A2 3186
|
||||
+mmm MACH_MMM MMM 3187
|
||||
+davinci_dm365_bv MACH_DAVINCI_DM365_BV DAVINCI_DM365_BV 3188
|
||||
+ag5evm MACH_AG5EVM AG5EVM 3189
|
||||
+sc575plc MACH_SC575PLC SC575PLC 3190
|
||||
+sc575hmi MACH_SC575IPC SC575IPC 3191
|
||||
+omap3_tdm3730 MACH_OMAP3_TDM3730 OMAP3_TDM3730 3192
|
||||
+rover_g7 MACH_G7 G7 3193
|
||||
+top9000_eval MACH_TOP9000_EVAL TOP9000_EVAL 3194
|
||||
+top9000_su MACH_TOP9000_SU TOP9000_SU 3195
|
||||
+utm300 MACH_UTM300 UTM300 3196
|
||||
+tsunagi MACH_TSUNAGI TSUNAGI 3197
|
||||
+ts75xx MACH_TS75XX TS75XX 3198
|
||||
+msm8x60_charm_ffa MACH_MSM8X60_FUSN_FFA MSM8X60_FUSN_FFA 3199
|
||||
+ts47xx MACH_TS47XX TS47XX 3200
|
||||
+da850_k5 MACH_DA850_K5 DA850_K5 3201
|
||||
+ax502 MACH_AX502 AX502 3202
|
||||
+igep0032 MACH_IGEP0032 IGEP0032 3203
|
||||
+antero MACH_ANTERO ANTERO 3204
|
||||
+synergy MACH_SYNERGY SYNERGY 3205
|
||||
+ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206
|
||||
+wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207
|
||||
+punica MACH_PUNICA PUNICA 3208
|
||||
+trimslice MACH_SBC_NT250 SBC_NT250 3209
|
||||
+mx27_wmultra MACH_MX27_WMULTRA MX27_WMULTRA 3210
|
||||
+mackerel MACH_MACKEREL MACKEREL 3211
|
||||
+pvd_imx27 MACH_MACH_PVD_IMX27 MACH_PVD_IMX27 3212
|
||||
+fa9x27 MACH_FA9X27 FA9X27 3213
|
||||
+ns2816tb MACH_NS2816TB NS2816TB 3214
|
||||
+ns2816_ntpad MACH_NS2816_NTPAD NS2816_NTPAD 3215
|
||||
+ns2816_ntnb MACH_NS2816_NTNB NS2816_NTNB 3216
|
||||
+kaen MACH_KAEN KAEN 3217
|
||||
+nv1000 MACH_NV1000 NV1000 3218
|
||||
+nuc950ts MACH_NUC950TS NUC950TS 3219
|
||||
+nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220
|
||||
+ast2200 MACH_AST2200 AST2200 3221
|
||||
+lead MACH_LEAD LEAD 3222
|
||||
+unino1 MACH_UNINO1 UNINO1 3223
|
||||
+greeco MACH_GREECO GREECO 3224
|
||||
+verdi MACH_VERDI VERDI 3225
|
||||
+dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226
|
||||
+quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227
|
||||
+abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228
|
||||
+svcid MACH_SVCID SVCID 3229
|
||||
+msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230
|
||||
+msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231
|
||||
+icon_g MACH_ICON_G ICON_G 3232
|
||||
+mb3 MACH_MB3 MB3 3233
|
||||
+gsia18s MACH_GSIA18S GSIA18S 3234
|
||||
+pivicc MACH_PIVICC PIVICC 3235
|
||||
+pcm048 MACH_PCM048 PCM048 3236
|
||||
+dds MACH_DDS DDS 3237
|
||||
+chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238
|
||||
+ts48xx MACH_TS48XX TS48XX 3239
|
||||
+tonga2_tfttimer MACH_TONGA2_TFTTIMER TONGA2_TFTTIMER 3240
|
||||
+whistler MACH_WHISTLER WHISTLER 3241
|
||||
+asl_phoenix MACH_ASL_PHOENIX ASL_PHOENIX 3242
|
||||
+at91sam9263otlite MACH_AT91SAM9263OTLITE AT91SAM9263OTLITE 3243
|
||||
+ddplug MACH_DDPLUG DDPLUG 3244
|
||||
+d2plug MACH_D2PLUG D2PLUG 3245
|
||||
+kzm9d MACH_KZM9D KZM9D 3246
|
||||
+verdi_lte MACH_VERDI_LTE VERDI_LTE 3247
|
||||
+nanozoom MACH_NANOZOOM NANOZOOM 3248
|
||||
+dm3730_som_lv MACH_DM3730_SOM_LV DM3730_SOM_LV 3249
|
||||
+dm3730_torpedo MACH_DM3730_TORPEDO DM3730_TORPEDO 3250
|
||||
+anchovy MACH_ANCHOVY ANCHOVY 3251
|
||||
+linux MACH_LINUX LINUX 3252
|
||||
+re2rev20 MACH_RE2REV20 RE2REV20 3253
|
||||
+re2rev21 MACH_RE2REV21 RE2REV21 3254
|
||||
+cns21xx MACH_CNS21XX CNS21XX 3255
|
||||
+rider MACH_RIDER RIDER 3257
|
||||
+nsk330 MACH_NSK330 NSK330 3258
|
||||
+cns2133evb MACH_CNS2133EVB CNS2133EVB 3259
|
||||
+z3_816x_mod MACH_Z3_816X_MOD Z3_816X_MOD 3260
|
||||
+z3_814x_mod MACH_Z3_814X_MOD Z3_814X_MOD 3261
|
||||
+beect MACH_BEECT BEECT 3262
|
||||
+dma_thunderbug MACH_DMA_THUNDERBUG DMA_THUNDERBUG 3263
|
||||
+omn_at91sam9g20 MACH_OMN_AT91SAM9G20 OMN_AT91SAM9G20 3264
|
||||
+mx25_e2s_uc MACH_MX25_E2S_UC MX25_E2S_UC 3265
|
||||
+mione MACH_MIONE MIONE 3266
|
||||
+top9000_tcu MACH_TOP9000_TCU TOP9000_TCU 3267
|
||||
+top9000_bsl MACH_TOP9000_BSL TOP9000_BSL 3268
|
||||
+kingdom MACH_KINGDOM KINGDOM 3269
|
||||
+armadillo460 MACH_ARMADILLO460 ARMADILLO460 3270
|
||||
+lq2 MACH_LQ2 LQ2 3271
|
||||
+sweda_tms2 MACH_SWEDA_TMS2 SWEDA_TMS2 3272
|
||||
+mx53_loco MACH_MX53_LOCO MX53_LOCO 3273
|
||||
+acer_a7 MACH_MACH_ACER_A7 MACH_ACER_A7 3274
|
||||
+acer_a8 MACH_ACER_A8 ACER_A8 3275
|
||||
+acer_gauguin MACH_ACER_GAUGUIN ACER_GAUGUIN 3276
|
||||
+guppy MACH_GUPPY GUPPY 3277
|
||||
+mx61_ard MACH_MX61_ARD MX61_ARD 3278
|
||||
+tx53 MACH_TX53 TX53 3279
|
||||
+omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280
|
||||
+uemd MACH_UEMD UEMD 3281
|
||||
+ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282
|
||||
+rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283
|
||||
+nookcolor MACH_NOOKCOLOR NOOKCOLOR 3284
|
||||
+hkdkc100 MACH_HKDKC100 HKDKC100 3285
|
||||
+ts42xx MACH_TS42XX TS42XX 3286
|
||||
+aebl MACH_AEBL AEBL 3287
|
||||
+wario MACH_WARIO WARIO 3288
|
||||
+gfs_spm MACH_GFS_SPM GFS_SPM 3289
|
||||
+cm_t3730 MACH_CM_T3730 CM_T3730 3290
|
||||
+isc3 MACH_ISC3 ISC3 3291
|
||||
+rascal MACH_RASCAL RASCAL 3292
|
||||
+hrefv60 MACH_HREFV60 HREFV60 3293
|
||||
+tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294
|
||||
+pyramid_td MACH_PYRAMID_TD PYRAMID_TD 3295
|
||||
+splendor MACH_SPLENDOR SPLENDOR 3296
|
||||
+guf_planet MACH_GUF_PLANET GUF_PLANET 3297
|
||||
+msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298
|
||||
+htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299
|
||||
+athene MACH_ATHENE ATHENE 3300
|
||||
+deep_r_ek_1 MACH_DEEP_R_EK_1 DEEP_R_EK_1 3301
|
||||
+vivow_ct MACH_VIVOW_CT VIVOW_CT 3302
|
||||
+nery_1000 MACH_NERY_1000 NERY_1000 3303
|
||||
+rfl109145_ssrv MACH_RFL109145_SSRV RFL109145_SSRV 3304
|
||||
+nmh MACH_NMH NMH 3305
|
||||
+wn802t MACH_WN802T WN802T 3306
|
||||
+dragonet MACH_DRAGONET DRAGONET 3307
|
||||
+geneva_b MACH_GENEVA_B GENEVA_B 3308
|
||||
+at91sam9263desk16l MACH_AT91SAM9263DESK16L AT91SAM9263DESK16L 3309
|
||||
+bcmhana_sv MACH_BCMHANA_SV BCMHANA_SV 3310
|
||||
+bcmhana_tablet MACH_BCMHANA_TABLET BCMHANA_TABLET 3311
|
||||
+koi MACH_KOI KOI 3312
|
||||
+ts4800 MACH_TS4800 TS4800 3313
|
||||
+tqma9263 MACH_TQMA9263 TQMA9263 3314
|
||||
+holiday MACH_HOLIDAY HOLIDAY 3315
|
||||
+dma_6410 MACH_DMA6410 DMA6410 3316
|
||||
+pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317
|
||||
+hwgw6410 MACH_HWGW6410 HWGW6410 3318
|
||||
+shenzhou MACH_SHENZHOU SHENZHOU 3319
|
||||
+cwme9210 MACH_CWME9210 CWME9210 3320
|
||||
+cwme9210js MACH_CWME9210JS CWME9210JS 3321
|
||||
+pgs_v1 MACH_PGS_SITARA PGS_SITARA 3322
|
||||
+colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323
|
||||
+w21 MACH_W21 W21 3324
|
||||
+polysat1 MACH_POLYSAT1 POLYSAT1 3325
|
||||
+dataway MACH_DATAWAY DATAWAY 3326
|
||||
+cobral138 MACH_COBRAL138 COBRAL138 3327
|
||||
+roverpcs8 MACH_ROVERPCS8 ROVERPCS8 3328
|
||||
+marvelc MACH_MARVELC MARVELC 3329
|
||||
+navefihid MACH_NAVEFIHID NAVEFIHID 3330
|
||||
+dm365_cv100 MACH_DM365_CV100 DM365_CV100 3331
|
||||
+able MACH_ABLE ABLE 3332
|
||||
+legacy MACH_LEGACY LEGACY 3333
|
||||
+icong MACH_ICONG ICONG 3334
|
||||
+rover_g8 MACH_ROVER_G8 ROVER_G8 3335
|
||||
+t5388p MACH_T5388P T5388P 3336
|
|
@ -1,30 +0,0 @@
|
|||
--- a/include/linux/blkdev.h
|
||||
+++ b/include/linux/blkdev.h
|
||||
@@ -1287,6 +1287,8 @@ struct block_device_operations {
|
||||
unsigned long long);
|
||||
int (*revalidate_disk) (struct gendisk *);
|
||||
int (*getgeo)(struct block_device *, struct hd_geometry *);
|
||||
+ /* this callback is with swap_lock and sometimes page table lock held */
|
||||
+ void (*swap_slot_free_notify) (struct block_device *, unsigned long);
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
--- a/mm/swapfile.c
|
||||
+++ b/mm/swapfile.c
|
||||
@@ -576,6 +576,7 @@ static unsigned char swap_entry_free(str
|
||||
|
||||
/* free if no reference */
|
||||
if (!usage) {
|
||||
+ struct gendisk *disk = p->bdev->bd_disk;
|
||||
if (offset < p->lowest_bit)
|
||||
p->lowest_bit = offset;
|
||||
if (offset > p->highest_bit)
|
||||
@@ -585,6 +586,8 @@ static unsigned char swap_entry_free(str
|
||||
swap_list.next = p->type;
|
||||
nr_swap_pages++;
|
||||
p->inuse_pages--;
|
||||
+ if (disk->fops->swap_slot_free_notify)
|
||||
+ disk->fops->swap_slot_free_notify(p->bdev, offset);
|
||||
}
|
||||
|
||||
return usage;
|
|
@ -1,57 +0,0 @@
|
|||
From d0f226a0f104c7d1da1d215b8013359273e39e18 Mon Sep 17 00:00:00 2001
|
||||
From: Albin Tonnerre <albin.tonnerre@free-electrons.com>
|
||||
Date: Fri, 16 Oct 2009 16:17:22 +0200
|
||||
Subject: [PATCH] Add LZMA decompression on ARM
|
||||
|
||||
|
||||
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
|
||||
---
|
||||
arch/arm/Kconfig | 1 +
|
||||
arch/arm/boot/compressed/Makefile | 1 +
|
||||
arch/arm/boot/compressed/misc.c | 4 ++++
|
||||
arch/arm/boot/compressed/piggy.lzma.S | 6 ++++++
|
||||
4 files changed, 12 insertions(+), 0 deletions(-)
|
||||
create mode 100644 arch/arm/boot/compressed/piggy.lzma.S
|
||||
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -21,6 +21,7 @@ config ARM
|
||||
select HAVE_GENERIC_DMA_COHERENT
|
||||
select HAVE_KERNEL_GZIP
|
||||
select HAVE_KERNEL_LZO
|
||||
+ select HAVE_KERNEL_LZMA
|
||||
select HAVE_PERF_EVENTS
|
||||
select PERF_USE_VMALLOC
|
||||
help
|
||||
--- a/arch/arm/boot/compressed/Makefile
|
||||
+++ b/arch/arm/boot/compressed/Makefile
|
||||
@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/
|
||||
|
||||
suffix_$(CONFIG_KERNEL_GZIP) = gzip
|
||||
suffix_$(CONFIG_KERNEL_LZO) = lzo
|
||||
+suffix_$(CONFIG_KERNEL_LZMA) = lzma
|
||||
|
||||
targets := vmlinux vmlinux.lds \
|
||||
piggy.$(suffix_y) piggy.$(suffix_y).o \
|
||||
--- a/arch/arm/boot/compressed/decompress.c
|
||||
+++ b/arch/arm/boot/compressed/decompress.c
|
||||
@@ -40,6 +40,10 @@ extern void error(char *);
|
||||
#include "../../../../lib/decompress_unlzo.c"
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_KERNEL_LZMA
|
||||
+#include "../../../../lib/decompress_unlzma.c"
|
||||
+#endif
|
||||
+
|
||||
void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
|
||||
{
|
||||
decompress(input, len, NULL, NULL, output, NULL, error);
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/compressed/piggy.lzma.S
|
||||
@@ -0,0 +1,6 @@
|
||||
+ .section .piggydata,#alloc
|
||||
+ .globl input_data
|
||||
+input_data:
|
||||
+ .incbin "arch/arm/boot/compressed/piggy.lzma"
|
||||
+ .globl input_data_end
|
||||
+input_data_end:
|
|
@ -1,120 +0,0 @@
|
|||
--- a/drivers/mtd/devices/block2mtd.c
|
||||
+++ b/drivers/mtd/devices/block2mtd.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/mount.h>
|
||||
@@ -233,10 +234,11 @@ static void block2mtd_free_device(struct
|
||||
|
||||
|
||||
/* FIXME: ensure that mtd->size % erase_size == 0 */
|
||||
-static struct block2mtd_dev *add_device(char *devname, int erase_size)
|
||||
+static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname)
|
||||
{
|
||||
struct block_device *bdev;
|
||||
struct block2mtd_dev *dev;
|
||||
+ struct mtd_partition *part;
|
||||
char *name;
|
||||
|
||||
if (!devname)
|
||||
@@ -274,17 +276,17 @@ static struct block2mtd_dev *add_device(
|
||||
|
||||
mutex_init(&dev->write_mutex);
|
||||
|
||||
- /* Setup the MTD structure */
|
||||
- /* make the name contain the block device in */
|
||||
- name = kmalloc(sizeof("block2mtd: ") + strlen(devname) + 1,
|
||||
- GFP_KERNEL);
|
||||
+ if (!mtdname)
|
||||
+ mtdname = devname;
|
||||
+
|
||||
+ name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
|
||||
if (!name)
|
||||
goto devinit_err;
|
||||
|
||||
- sprintf(name, "block2mtd: %s", devname);
|
||||
+ strcpy(name, mtdname);
|
||||
dev->mtd.name = name;
|
||||
|
||||
- dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
|
||||
+ dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK & ~(erase_size - 1);
|
||||
dev->mtd.erasesize = erase_size;
|
||||
dev->mtd.writesize = 1;
|
||||
dev->mtd.type = MTD_RAM;
|
||||
@@ -297,14 +299,17 @@ static struct block2mtd_dev *add_device(
|
||||
dev->mtd.priv = dev;
|
||||
dev->mtd.owner = THIS_MODULE;
|
||||
|
||||
- if (add_mtd_device(&dev->mtd)) {
|
||||
+ part = kzalloc(sizeof(struct mtd_partition), GFP_KERNEL);
|
||||
+ part->name = dev->mtd.name;
|
||||
+ part->offset = 0;
|
||||
+ part->size = dev->mtd.size;
|
||||
+ if (add_mtd_partitions(&dev->mtd, part, 1)) {
|
||||
/* Device didnt get added, so free the entry */
|
||||
goto devinit_err;
|
||||
}
|
||||
list_add(&dev->list, &blkmtd_device_list);
|
||||
INFO("mtd%d: [%s] erase_size = %dKiB [%d]", dev->mtd.index,
|
||||
- dev->mtd.name + strlen("block2mtd: "),
|
||||
- dev->mtd.erasesize >> 10, dev->mtd.erasesize);
|
||||
+ mtdname, dev->mtd.erasesize >> 10, dev->mtd.erasesize);
|
||||
return dev;
|
||||
|
||||
devinit_err:
|
||||
@@ -377,9 +382,9 @@ static char block2mtd_paramline[80 + 12]
|
||||
|
||||
static int block2mtd_setup2(const char *val)
|
||||
{
|
||||
- char buf[80 + 12]; /* 80 for device, 12 for erase size */
|
||||
+ char buf[80 + 12 + 80]; /* 80 for device, 12 for erase size, 80 for name */
|
||||
char *str = buf;
|
||||
- char *token[2];
|
||||
+ char *token[3];
|
||||
char *name;
|
||||
size_t erase_size = PAGE_SIZE;
|
||||
int i, ret;
|
||||
@@ -390,7 +395,7 @@ static int block2mtd_setup2(const char *
|
||||
strcpy(str, val);
|
||||
kill_final_newline(str);
|
||||
|
||||
- for (i = 0; i < 2; i++)
|
||||
+ for (i = 0; i < 3; i++)
|
||||
token[i] = strsep(&str, ",");
|
||||
|
||||
if (str)
|
||||
@@ -409,8 +414,10 @@ static int block2mtd_setup2(const char *
|
||||
parse_err("illegal erase size");
|
||||
}
|
||||
}
|
||||
+ if (token[2] && (strlen(token[2]) + 1 > 80))
|
||||
+ parse_err("mtd device name too long");
|
||||
|
||||
- add_device(name, erase_size);
|
||||
+ add_device(name, erase_size, token[2]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -444,7 +451,7 @@ static int block2mtd_setup(const char *v
|
||||
|
||||
|
||||
module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
|
||||
-MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\"");
|
||||
+MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>[,<name>]]\"");
|
||||
|
||||
static int __init block2mtd_init(void)
|
||||
{
|
||||
--- a/fs/partitions/check.c
|
||||
+++ b/fs/partitions/check.c
|
||||
@@ -639,6 +639,7 @@ try_scan:
|
||||
kfree(state);
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(rescan_partitions);
|
||||
|
||||
unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
|
||||
{
|
|
@ -1,625 +0,0 @@
|
|||
--- a/drivers/mtd/Kconfig
|
||||
+++ b/drivers/mtd/Kconfig
|
||||
@@ -53,6 +53,16 @@ config MTD_PARTITIONS
|
||||
devices. Partitioning on NFTL 'devices' is a different - that's the
|
||||
'normal' form of partitioning used on a block device.
|
||||
|
||||
+config MTD_ROOTFS_ROOT_DEV
|
||||
+ bool "Automatically set 'rootfs' partition to be root filesystem"
|
||||
+ depends on MTD_PARTITIONS
|
||||
+ default y
|
||||
+
|
||||
+config MTD_ROOTFS_SPLIT
|
||||
+ bool "Automatically split 'rootfs' partition for squashfs"
|
||||
+ depends on MTD_PARTITIONS
|
||||
+ default y
|
||||
+
|
||||
config MTD_REDBOOT_PARTS
|
||||
tristate "RedBoot partition table parsing"
|
||||
depends on MTD_PARTITIONS
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/compatmac.h>
|
||||
+#include <linux/root_dev.h>
|
||||
+#include <linux/magic.h>
|
||||
|
||||
/* Our partition linked list */
|
||||
static LIST_HEAD(mtd_partitions);
|
||||
@@ -35,7 +37,7 @@ struct mtd_part {
|
||||
* the pointer to that structure with this macro.
|
||||
*/
|
||||
#define PART(x) ((struct mtd_part *)(x))
|
||||
-
|
||||
+#define IS_PART(mtd) (mtd->read == part_read)
|
||||
|
||||
/*
|
||||
* MTD methods which simply translate the effective address and pass through
|
||||
@@ -503,6 +505,150 @@ out_register:
|
||||
return slave;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_MTD_ROOTFS_SPLIT
|
||||
+#define ROOTFS_SPLIT_NAME "rootfs_data"
|
||||
+#define ROOTFS_REMOVED_NAME "<removed>"
|
||||
+
|
||||
+struct squashfs_super_block {
|
||||
+ __le32 s_magic;
|
||||
+ __le32 pad0[9];
|
||||
+ __le64 bytes_used;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static int split_squashfs(struct mtd_info *master, int offset, int *split_offset)
|
||||
+{
|
||||
+ struct squashfs_super_block sb;
|
||||
+ int len, ret;
|
||||
+
|
||||
+ ret = master->read(master, offset, sizeof(sb), &len, (void *) &sb);
|
||||
+ if (ret || (len != sizeof(sb))) {
|
||||
+ printk(KERN_ALERT "split_squashfs: error occured while reading "
|
||||
+ "from \"%s\"\n", master->name);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (SQUASHFS_MAGIC != le32_to_cpu(sb.s_magic) ) {
|
||||
+ printk(KERN_ALERT "split_squashfs: no squashfs found in \"%s\"\n",
|
||||
+ master->name);
|
||||
+ *split_offset = 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (le64_to_cpu((sb.bytes_used)) <= 0) {
|
||||
+ printk(KERN_ALERT "split_squashfs: squashfs is empty in \"%s\"\n",
|
||||
+ master->name);
|
||||
+ *split_offset = 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ len = (u32) le64_to_cpu(sb.bytes_used);
|
||||
+ len += (offset & 0x000fffff);
|
||||
+ len += (master->erasesize - 1);
|
||||
+ len &= ~(master->erasesize - 1);
|
||||
+ len -= (offset & 0x000fffff);
|
||||
+ *split_offset = offset + len;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int split_rootfs_data(struct mtd_info *master, struct mtd_info *rpart, const struct mtd_partition *part)
|
||||
+{
|
||||
+ struct mtd_partition *dpart;
|
||||
+ struct mtd_part *slave = NULL;
|
||||
+ int split_offset = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = split_squashfs(master, part->offset, &split_offset);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (split_offset <= 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ dpart = kmalloc(sizeof(*part)+sizeof(ROOTFS_SPLIT_NAME)+1, GFP_KERNEL);
|
||||
+ if (dpart == NULL) {
|
||||
+ printk(KERN_INFO "split_squashfs: no memory for partition \"%s\"\n",
|
||||
+ ROOTFS_SPLIT_NAME);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ memcpy(dpart, part, sizeof(*part));
|
||||
+ dpart->name = (unsigned char *)&dpart[1];
|
||||
+ strcpy(dpart->name, ROOTFS_SPLIT_NAME);
|
||||
+
|
||||
+ dpart->size -= split_offset - dpart->offset;
|
||||
+ dpart->offset = split_offset;
|
||||
+
|
||||
+ if (dpart == NULL)
|
||||
+ return 1;
|
||||
+
|
||||
+ printk(KERN_INFO "mtd: partition \"%s\" created automatically, ofs=%llX, len=%llX \n",
|
||||
+ ROOTFS_SPLIT_NAME, dpart->offset, dpart->size);
|
||||
+
|
||||
+ slave = add_one_partition(master, dpart, 0, split_offset);
|
||||
+ if (!slave) {
|
||||
+ kfree(dpart);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ rpart->split = &slave->mtd;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int refresh_rootfs_split(struct mtd_info *mtd)
|
||||
+{
|
||||
+ struct mtd_partition tpart;
|
||||
+ struct mtd_part *part;
|
||||
+ char *name;
|
||||
+ //int index = 0;
|
||||
+ int offset, size;
|
||||
+ int ret;
|
||||
+
|
||||
+ part = PART(mtd);
|
||||
+
|
||||
+ /* check for the new squashfs offset first */
|
||||
+ ret = split_squashfs(part->master, part->offset, &offset);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((offset > 0) && !mtd->split) {
|
||||
+ printk(KERN_INFO "%s: creating new split partition for \"%s\"\n", __func__, mtd->name);
|
||||
+ /* if we don't have a rootfs split partition, create a new one */
|
||||
+ tpart.name = (char *) mtd->name;
|
||||
+ tpart.size = mtd->size;
|
||||
+ tpart.offset = part->offset;
|
||||
+
|
||||
+ return split_rootfs_data(part->master, &part->mtd, &tpart);
|
||||
+ } else if ((offset > 0) && mtd->split) {
|
||||
+ /* update the offsets of the existing partition */
|
||||
+ size = mtd->size + part->offset - offset;
|
||||
+
|
||||
+ part = PART(mtd->split);
|
||||
+ part->offset = offset;
|
||||
+ part->mtd.size = size;
|
||||
+ printk(KERN_INFO "%s: %s partition \"" ROOTFS_SPLIT_NAME "\", offset: 0x%06x (0x%06x)\n",
|
||||
+ __func__, (!strcmp(part->mtd.name, ROOTFS_SPLIT_NAME) ? "updating" : "creating"),
|
||||
+ (u32) part->offset, (u32) part->mtd.size);
|
||||
+ name = kmalloc(sizeof(ROOTFS_SPLIT_NAME) + 1, GFP_KERNEL);
|
||||
+ strcpy(name, ROOTFS_SPLIT_NAME);
|
||||
+ part->mtd.name = name;
|
||||
+ } else if ((offset <= 0) && mtd->split) {
|
||||
+ printk(KERN_INFO "%s: removing partition \"%s\"\n", __func__, mtd->split->name);
|
||||
+
|
||||
+ /* mark existing partition as removed */
|
||||
+ part = PART(mtd->split);
|
||||
+ name = kmalloc(sizeof(ROOTFS_SPLIT_NAME) + 1, GFP_KERNEL);
|
||||
+ strcpy(name, ROOTFS_REMOVED_NAME);
|
||||
+ part->mtd.name = name;
|
||||
+ part->offset = 0;
|
||||
+ part->mtd.size = 0;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_MTD_ROOTFS_SPLIT */
|
||||
+
|
||||
/*
|
||||
* This function, given a master MTD object and a partition table, creates
|
||||
* and registers slave MTD objects which are bound to the master according to
|
||||
@@ -518,7 +664,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
{
|
||||
struct mtd_part *slave;
|
||||
uint64_t cur_offset = 0;
|
||||
- int i;
|
||||
+ int i, ret;
|
||||
|
||||
printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
|
||||
|
||||
@@ -526,6 +672,21 @@ int add_mtd_partitions(struct mtd_info *
|
||||
slave = add_one_partition(master, parts + i, i, cur_offset);
|
||||
if (!slave)
|
||||
return -ENOMEM;
|
||||
+
|
||||
+ if (!strcmp(parts[i].name, "rootfs")) {
|
||||
+#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
|
||||
+ if (ROOT_DEV == 0) {
|
||||
+ printk(KERN_NOTICE "mtd: partition \"rootfs\" "
|
||||
+ "set to be root filesystem\n");
|
||||
+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, slave->mtd.index);
|
||||
+ }
|
||||
+#endif
|
||||
+#ifdef CONFIG_MTD_ROOTFS_SPLIT
|
||||
+ ret = split_rootfs_data(master, &slave->mtd, &parts[i]);
|
||||
+ /* if (ret == 0)
|
||||
+ j++; */
|
||||
+#endif
|
||||
+ }
|
||||
cur_offset = slave->offset + slave->mtd.size;
|
||||
}
|
||||
|
||||
@@ -533,6 +694,32 @@ int add_mtd_partitions(struct mtd_info *
|
||||
}
|
||||
EXPORT_SYMBOL(add_mtd_partitions);
|
||||
|
||||
+int refresh_mtd_partitions(struct mtd_info *mtd)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (IS_PART(mtd)) {
|
||||
+ struct mtd_part *part;
|
||||
+ struct mtd_info *master;
|
||||
+
|
||||
+ part = PART(mtd);
|
||||
+ master = part->master;
|
||||
+ if (master->refresh_device)
|
||||
+ ret = master->refresh_device(master);
|
||||
+ }
|
||||
+
|
||||
+ if (!ret && mtd->refresh_device)
|
||||
+ ret = mtd->refresh_device(mtd);
|
||||
+
|
||||
+#ifdef CONFIG_MTD_ROOTFS_SPLIT
|
||||
+ if (!ret && IS_PART(mtd) && !strcmp(mtd->name, "rootfs"))
|
||||
+ refresh_rootfs_split(mtd);
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(refresh_mtd_partitions);
|
||||
+
|
||||
static DEFINE_SPINLOCK(part_parser_lock);
|
||||
static LIST_HEAD(part_parsers);
|
||||
|
||||
--- a/drivers/mtd/devices/block2mtd.c
|
||||
+++ b/drivers/mtd/devices/block2mtd.c
|
||||
@@ -30,6 +30,8 @@ struct block2mtd_dev {
|
||||
struct block_device *blkdev;
|
||||
struct mtd_info mtd;
|
||||
struct mutex write_mutex;
|
||||
+ rwlock_t bdev_mutex;
|
||||
+ char devname[0];
|
||||
};
|
||||
|
||||
|
||||
@@ -82,6 +84,12 @@ static int block2mtd_erase(struct mtd_in
|
||||
size_t len = instr->len;
|
||||
int err;
|
||||
|
||||
+ read_lock(&dev->bdev_mutex);
|
||||
+ if (!dev->blkdev) {
|
||||
+ err = -EINVAL;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
instr->state = MTD_ERASING;
|
||||
mutex_lock(&dev->write_mutex);
|
||||
err = _block2mtd_erase(dev, from, len);
|
||||
@@ -94,6 +102,10 @@ static int block2mtd_erase(struct mtd_in
|
||||
|
||||
instr->state = MTD_ERASE_DONE;
|
||||
mtd_erase_callback(instr);
|
||||
+
|
||||
+done:
|
||||
+ read_unlock(&dev->bdev_mutex);
|
||||
+
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -105,10 +117,14 @@ static int block2mtd_read(struct mtd_inf
|
||||
struct page *page;
|
||||
int index = from >> PAGE_SHIFT;
|
||||
int offset = from & (PAGE_SIZE-1);
|
||||
- int cpylen;
|
||||
+ int cpylen, err = 0;
|
||||
+
|
||||
+ read_lock(&dev->bdev_mutex);
|
||||
+ if (!dev->blkdev || (from > mtd->size)) {
|
||||
+ err = -EINVAL;
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
- if (from > mtd->size)
|
||||
- return -EINVAL;
|
||||
if (from + len > mtd->size)
|
||||
len = mtd->size - from;
|
||||
|
||||
@@ -123,10 +139,14 @@ static int block2mtd_read(struct mtd_inf
|
||||
len = len - cpylen;
|
||||
|
||||
page = page_read(dev->blkdev->bd_inode->i_mapping, index);
|
||||
- if (!page)
|
||||
- return -ENOMEM;
|
||||
- if (IS_ERR(page))
|
||||
- return PTR_ERR(page);
|
||||
+ if (!page) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto done;
|
||||
+ }
|
||||
+ if (IS_ERR(page)) {
|
||||
+ err = PTR_ERR(page);
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
memcpy(buf, page_address(page) + offset, cpylen);
|
||||
page_cache_release(page);
|
||||
@@ -137,7 +157,10 @@ static int block2mtd_read(struct mtd_inf
|
||||
offset = 0;
|
||||
index++;
|
||||
}
|
||||
- return 0;
|
||||
+
|
||||
+done:
|
||||
+ read_unlock(&dev->bdev_mutex);
|
||||
+ return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,12 +212,22 @@ static int block2mtd_write(struct mtd_in
|
||||
size_t *retlen, const u_char *buf)
|
||||
{
|
||||
struct block2mtd_dev *dev = mtd->priv;
|
||||
- int err;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ read_lock(&dev->bdev_mutex);
|
||||
+ if (!dev->blkdev) {
|
||||
+ err = -EINVAL;
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
if (!len)
|
||||
- return 0;
|
||||
- if (to >= mtd->size)
|
||||
- return -ENOSPC;
|
||||
+ goto done;
|
||||
+
|
||||
+ if (to >= mtd->size) {
|
||||
+ err = -ENOSPC;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
if (to + len > mtd->size)
|
||||
len = mtd->size - to;
|
||||
|
||||
@@ -203,6 +236,9 @@ static int block2mtd_write(struct mtd_in
|
||||
mutex_unlock(&dev->write_mutex);
|
||||
if (err > 0)
|
||||
err = 0;
|
||||
+
|
||||
+done:
|
||||
+ read_unlock(&dev->bdev_mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -211,52 +247,29 @@ static int block2mtd_write(struct mtd_in
|
||||
static void block2mtd_sync(struct mtd_info *mtd)
|
||||
{
|
||||
struct block2mtd_dev *dev = mtd->priv;
|
||||
- sync_blockdev(dev->blkdev);
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void block2mtd_free_device(struct block2mtd_dev *dev)
|
||||
-{
|
||||
- if (!dev)
|
||||
- return;
|
||||
-
|
||||
- kfree(dev->mtd.name);
|
||||
|
||||
- if (dev->blkdev) {
|
||||
- invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping,
|
||||
- 0, -1);
|
||||
- close_bdev_exclusive(dev->blkdev, FMODE_READ|FMODE_WRITE);
|
||||
- }
|
||||
+ read_lock(&dev->bdev_mutex);
|
||||
+ if (dev->blkdev)
|
||||
+ sync_blockdev(dev->blkdev);
|
||||
+ read_unlock(&dev->bdev_mutex);
|
||||
|
||||
- kfree(dev);
|
||||
+ return;
|
||||
}
|
||||
|
||||
|
||||
-/* FIXME: ensure that mtd->size % erase_size == 0 */
|
||||
-static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname)
|
||||
+static int _open_bdev(struct block2mtd_dev *dev)
|
||||
{
|
||||
struct block_device *bdev;
|
||||
- struct block2mtd_dev *dev;
|
||||
- struct mtd_partition *part;
|
||||
- char *name;
|
||||
-
|
||||
- if (!devname)
|
||||
- return NULL;
|
||||
-
|
||||
- dev = kzalloc(sizeof(struct block2mtd_dev), GFP_KERNEL);
|
||||
- if (!dev)
|
||||
- return NULL;
|
||||
|
||||
/* Get a handle on the device */
|
||||
- bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, NULL);
|
||||
+ bdev = open_bdev_exclusive(dev->devname, FMODE_READ|FMODE_WRITE, NULL);
|
||||
#ifndef MODULE
|
||||
if (IS_ERR(bdev)) {
|
||||
|
||||
/* We might not have rootfs mounted at this point. Try
|
||||
to resolve the device name by other means. */
|
||||
|
||||
- dev_t devt = name_to_dev_t(devname);
|
||||
+ dev_t devt = name_to_dev_t(dev->devname);
|
||||
if (devt) {
|
||||
bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
|
||||
}
|
||||
@@ -264,17 +277,98 @@ static struct block2mtd_dev *add_device(
|
||||
#endif
|
||||
|
||||
if (IS_ERR(bdev)) {
|
||||
- ERROR("error: cannot open device %s", devname);
|
||||
- goto devinit_err;
|
||||
+ ERROR("error: cannot open device %s", dev->devname);
|
||||
+ return 1;
|
||||
}
|
||||
dev->blkdev = bdev;
|
||||
|
||||
if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
|
||||
ERROR("attempting to use an MTD device as a block device");
|
||||
- goto devinit_err;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void _close_bdev(struct block2mtd_dev *dev)
|
||||
+{
|
||||
+ struct block_device *bdev;
|
||||
+
|
||||
+ if (!dev->blkdev)
|
||||
+ return;
|
||||
+
|
||||
+ bdev = dev->blkdev;
|
||||
+ invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping, 0, -1);
|
||||
+ close_bdev_exclusive(dev->blkdev, FMODE_READ|FMODE_WRITE);
|
||||
+ dev->blkdev = NULL;
|
||||
+}
|
||||
+
|
||||
+static void block2mtd_free_device(struct block2mtd_dev *dev)
|
||||
+{
|
||||
+ if (!dev)
|
||||
+ return;
|
||||
+
|
||||
+ kfree(dev->mtd.name);
|
||||
+ _close_bdev(dev);
|
||||
+ kfree(dev);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int block2mtd_refresh(struct mtd_info *mtd)
|
||||
+{
|
||||
+ struct block2mtd_dev *dev = mtd->priv;
|
||||
+ struct block_device *bdev;
|
||||
+ dev_t devt;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ /* no other mtd function can run at this point */
|
||||
+ write_lock(&dev->bdev_mutex);
|
||||
+
|
||||
+ /* get the device number for the whole disk */
|
||||
+ devt = MKDEV(MAJOR(dev->blkdev->bd_dev), 0);
|
||||
+
|
||||
+ /* close the old block device */
|
||||
+ _close_bdev(dev);
|
||||
+
|
||||
+ /* open the whole disk, issue a partition rescan, then */
|
||||
+ bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
|
||||
+ if (!bdev || !bdev->bd_disk)
|
||||
+ err = -EINVAL;
|
||||
+#ifndef CONFIG_MTD_BLOCK2MTD_MODULE
|
||||
+ else
|
||||
+ err = rescan_partitions(bdev->bd_disk, bdev);
|
||||
+#endif
|
||||
+ if (bdev)
|
||||
+ close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE);
|
||||
+
|
||||
+ /* try to open the partition block device again */
|
||||
+ _open_bdev(dev);
|
||||
+ write_unlock(&dev->bdev_mutex);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+/* FIXME: ensure that mtd->size % erase_size == 0 */
|
||||
+static struct block2mtd_dev *add_device(char *devname, int erase_size, char *mtdname)
|
||||
+{
|
||||
+ struct block2mtd_dev *dev;
|
||||
+ struct mtd_partition *part;
|
||||
+ char *name;
|
||||
+
|
||||
+ if (!devname)
|
||||
+ return NULL;
|
||||
+
|
||||
+ dev = kzalloc(sizeof(struct block2mtd_dev) + strlen(devname) + 1, GFP_KERNEL);
|
||||
+ if (!dev)
|
||||
+ return NULL;
|
||||
+
|
||||
+ strcpy(dev->devname, devname);
|
||||
+
|
||||
+ if (_open_bdev(dev))
|
||||
+ goto devinit_err;
|
||||
+
|
||||
mutex_init(&dev->write_mutex);
|
||||
+ rwlock_init(&dev->bdev_mutex);
|
||||
|
||||
if (!mtdname)
|
||||
mtdname = devname;
|
||||
@@ -298,6 +392,7 @@ static struct block2mtd_dev *add_device(
|
||||
dev->mtd.read = block2mtd_read;
|
||||
dev->mtd.priv = dev;
|
||||
dev->mtd.owner = THIS_MODULE;
|
||||
+ dev->mtd.refresh_device = block2mtd_refresh;
|
||||
|
||||
part = kzalloc(sizeof(struct mtd_partition), GFP_KERNEL);
|
||||
part->name = dev->mtd.name;
|
||||
--- a/drivers/mtd/mtdchar.c
|
||||
+++ b/drivers/mtd/mtdchar.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/compatmac.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
@@ -814,6 +815,13 @@ static int mtd_ioctl(struct inode *inode
|
||||
file->f_pos = 0;
|
||||
break;
|
||||
}
|
||||
+#ifdef CONFIG_MTD_PARTITIONS
|
||||
+ case MTDREFRESH:
|
||||
+ {
|
||||
+ ret = refresh_mtd_partitions(mtd);
|
||||
+ break;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
default:
|
||||
ret = -ENOTTY;
|
||||
--- a/include/linux/mtd/mtd.h
|
||||
+++ b/include/linux/mtd/mtd.h
|
||||
@@ -101,6 +101,7 @@ struct mtd_oob_ops {
|
||||
uint8_t *oobbuf;
|
||||
};
|
||||
|
||||
+struct mtd_info;
|
||||
struct mtd_info {
|
||||
u_char type;
|
||||
uint32_t flags;
|
||||
@@ -241,6 +242,9 @@ struct mtd_info {
|
||||
struct device dev;
|
||||
int usecount;
|
||||
|
||||
+ int (*refresh_device)(struct mtd_info *mtd);
|
||||
+ struct mtd_info *split;
|
||||
+
|
||||
/* If the driver is something smart, like UBI, it may need to maintain
|
||||
* its own reference counting. The below functions are only for driver.
|
||||
* The driver may register its callbacks. These callbacks are not
|
||||
--- a/include/linux/mtd/partitions.h
|
||||
+++ b/include/linux/mtd/partitions.h
|
||||
@@ -34,12 +34,14 @@
|
||||
* erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
|
||||
*/
|
||||
|
||||
+struct mtd_partition;
|
||||
struct mtd_partition {
|
||||
char *name; /* identifier string */
|
||||
uint64_t size; /* partition size */
|
||||
uint64_t offset; /* offset within the master MTD space */
|
||||
uint32_t mask_flags; /* master MTD flags to mask out for this partition */
|
||||
struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
|
||||
+ int (*refresh_partition)(struct mtd_info *);
|
||||
};
|
||||
|
||||
#define MTDPART_OFS_NXTBLK (-2)
|
||||
@@ -51,6 +53,7 @@ struct mtd_info;
|
||||
|
||||
int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
|
||||
int del_mtd_partitions(struct mtd_info *);
|
||||
+int refresh_mtd_partitions(struct mtd_info *);
|
||||
|
||||
/*
|
||||
* Functions dealing with the various ways of partitioning the space
|
||||
--- a/include/mtd/mtd-abi.h
|
||||
+++ b/include/mtd/mtd-abi.h
|
||||
@@ -110,6 +110,7 @@ struct otp_info {
|
||||
#define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
|
||||
#define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
|
||||
#define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
|
||||
+#define MTDREFRESH _IO('M', 23)
|
||||
|
||||
/*
|
||||
* Obsolete legacy interface. Keep it in order not to break userspace
|
|
@ -1,10 +0,0 @@
|
|||
--- a/drivers/mtd/devices/block2mtd.c
|
||||
+++ b/drivers/mtd/devices/block2mtd.c
|
||||
@@ -269,6 +269,7 @@ static int _open_bdev(struct block2mtd_d
|
||||
/* We might not have rootfs mounted at this point. Try
|
||||
to resolve the device name by other means. */
|
||||
|
||||
+ wait_for_device_probe();
|
||||
dev_t devt = name_to_dev_t(dev->devname);
|
||||
if (devt) {
|
||||
bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
|
|
@ -1,30 +0,0 @@
|
|||
--- a/drivers/mtd/redboot.c
|
||||
+++ b/drivers/mtd/redboot.c
|
||||
@@ -249,14 +249,21 @@ static int parse_redboot_partitions(stru
|
||||
#endif
|
||||
names += strlen(names)+1;
|
||||
|
||||
-#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||
if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
|
||||
- i++;
|
||||
- parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||
- parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||
- parts[i].name = nullname;
|
||||
- }
|
||||
+ if (!strcmp(parts[i].name, "rootfs")) {
|
||||
+ parts[i].size = fl->next->img->flash_base;
|
||||
+ parts[i].size &= ~(master->erasesize - 1);
|
||||
+ parts[i].size -= parts[i].offset;
|
||||
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||
+ nrparts--;
|
||||
+ } else {
|
||||
+ i++;
|
||||
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||
+ parts[i].name = nullname;
|
||||
#endif
|
||||
+ }
|
||||
+ }
|
||||
tmp_fl = fl;
|
||||
fl = fl->next;
|
||||
kfree(tmp_fl);
|
|
@ -1,60 +0,0 @@
|
|||
--- a/drivers/mtd/redboot.c
|
||||
+++ b/drivers/mtd/redboot.c
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
+#define BOARD_CONFIG_PART "boardconfig"
|
||||
+
|
||||
struct fis_image_desc {
|
||||
unsigned char name[16]; // Null terminated name
|
||||
uint32_t flash_base; // Address within FLASH of image
|
||||
@@ -41,6 +43,7 @@ static int parse_redboot_partitions(stru
|
||||
struct mtd_partition **pparts,
|
||||
unsigned long fis_origin)
|
||||
{
|
||||
+ unsigned long max_offset = 0;
|
||||
int nrparts = 0;
|
||||
struct fis_image_desc *buf;
|
||||
struct mtd_partition *parts;
|
||||
@@ -209,14 +212,14 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
}
|
||||
#endif
|
||||
- parts = kzalloc(sizeof(*parts)*nrparts + nulllen + namelen, GFP_KERNEL);
|
||||
+ parts = kzalloc(sizeof(*parts) * (nrparts + 1) + nulllen + namelen + sizeof(BOARD_CONFIG_PART), GFP_KERNEL);
|
||||
|
||||
if (!parts) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- nullname = (char *)&parts[nrparts];
|
||||
+ nullname = (char *)&parts[nrparts + 1];
|
||||
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||
if (nulllen > 0) {
|
||||
strcpy(nullname, nullstring);
|
||||
@@ -235,6 +238,8 @@ static int parse_redboot_partitions(stru
|
||||
}
|
||||
#endif
|
||||
for ( ; i<nrparts; i++) {
|
||||
+ if(max_offset < buf[i].flash_base + buf[i].size)
|
||||
+ max_offset = buf[i].flash_base + buf[i].size;
|
||||
parts[i].size = fl->img->size;
|
||||
parts[i].offset = fl->img->flash_base;
|
||||
parts[i].name = names;
|
||||
@@ -268,6 +273,14 @@ static int parse_redboot_partitions(stru
|
||||
fl = fl->next;
|
||||
kfree(tmp_fl);
|
||||
}
|
||||
+ if(master->size - max_offset >= master->erasesize)
|
||||
+ {
|
||||
+ parts[nrparts].size = master->size - max_offset;
|
||||
+ parts[nrparts].offset = max_offset;
|
||||
+ parts[nrparts].name = names;
|
||||
+ strcpy(names, BOARD_CONFIG_PART);
|
||||
+ nrparts++;
|
||||
+ }
|
||||
ret = nrparts;
|
||||
*pparts = parts;
|
||||
out:
|
|
@ -1,32 +0,0 @@
|
|||
--- a/include/linux/mtd/nand.h
|
||||
+++ b/include/linux/mtd/nand.h
|
||||
@@ -491,6 +491,7 @@ struct platform_nand_chip {
|
||||
int chip_delay;
|
||||
unsigned int options;
|
||||
const char **part_probe_types;
|
||||
+ int (*chip_fixup)(struct mtd_info *mtd);
|
||||
void (*set_parts)(uint64_t size,
|
||||
struct platform_nand_chip *chip);
|
||||
void *priv;
|
||||
--- a/drivers/mtd/nand/plat_nand.c
|
||||
+++ b/drivers/mtd/nand/plat_nand.c
|
||||
@@ -91,7 +91,18 @@ static int __devinit plat_nand_probe(str
|
||||
}
|
||||
|
||||
/* Scan to find existance of the device */
|
||||
- if (nand_scan(&data->mtd, pdata->chip.nr_chips)) {
|
||||
+ if (nand_scan_ident(&data->mtd, pdata->chip.nr_chips)) {
|
||||
+ err = -ENXIO;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (pdata->chip.chip_fixup) {
|
||||
+ err = pdata->chip.chip_fixup(&data->mtd);
|
||||
+ if (err)
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (nand_scan_tail(&data->mtd)) {
|
||||
err = -ENXIO;
|
||||
goto out;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
--- a/drivers/mtd/Kconfig
|
||||
+++ b/drivers/mtd/Kconfig
|
||||
@@ -181,6 +181,22 @@ config MTD_AR7_PARTS
|
||||
---help---
|
||||
TI AR7 partitioning support
|
||||
|
||||
+config MTD_MYLOADER_PARTS
|
||||
+ tristate "MyLoader partition parsing"
|
||||
+ depends on MTD_PARTITIONS && (ADM5120 || ATHEROS_AR231X || ATHEROS_AR71XX)
|
||||
+ ---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
|
||||
--- a/drivers/mtd/Makefile
|
||||
+++ b/drivers/mtd/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdli
|
||||
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
|
||||
obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
|
||||
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
|
||||
+obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
|
||||
|
||||
# 'Users' - code which presents functionality to userspace.
|
||||
obj-$(CONFIG_MTD_CHAR) += mtdchar.o
|
|
@ -1,18 +0,0 @@
|
|||
--- a/include/linux/mtd/partitions.h
|
||||
+++ b/include/linux/mtd/partitions.h
|
||||
@@ -33,6 +33,7 @@
|
||||
* Note: writeable partitions require their size and offset be
|
||||
* erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
|
||||
*/
|
||||
+struct mtd_info;
|
||||
|
||||
struct mtd_partition;
|
||||
struct mtd_partition {
|
||||
@@ -49,7 +50,6 @@ struct mtd_partition {
|
||||
#define MTDPART_SIZ_FULL (0)
|
||||
|
||||
|
||||
-struct mtd_info;
|
||||
|
||||
int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
|
||||
int del_mtd_partitions(struct mtd_info *);
|
|
@ -1,12 +0,0 @@
|
|||
--- a/drivers/mtd/nand/nand_ecc.c
|
||||
+++ b/drivers/mtd/nand/nand_ecc.c
|
||||
@@ -507,8 +507,7 @@ int __nand_correct_data(unsigned char *b
|
||||
if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
|
||||
return 1; /* error in ecc data; no action needed */
|
||||
|
||||
- printk(KERN_ERR "uncorrectable error : ");
|
||||
- return -1;
|
||||
+ return -EBADMSG;
|
||||
}
|
||||
EXPORT_SYMBOL(__nand_correct_data);
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -41,6 +41,7 @@
|
||||
#define OPCODE_BE_4K 0x20 /* Erase 4KiB block */
|
||||
#define OPCODE_BE_32K 0x52 /* Erase 32KiB block */
|
||||
#define OPCODE_CHIP_ERASE 0xc7 /* Erase whole flash chip */
|
||||
+#define OPCODE_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips*/
|
||||
#define OPCODE_SE 0xd8 /* Sector erase (usually 64KiB) */
|
||||
#define OPCODE_RDID 0x9f /* Read JEDEC ID */
|
||||
|
||||
@@ -600,6 +601,7 @@ struct flash_info {
|
||||
u16 flags;
|
||||
#define SECT_4K 0x01 /* OPCODE_BE_4K works uniformly */
|
||||
#define M25P_NO_ERASE 0x02 /* No erase command needed */
|
||||
+#define SECT_4K_PMC 0x04 /* OPCODE_BE_4K_PMC works uniformly */
|
||||
};
|
||||
|
||||
#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
|
||||
@@ -646,6 +648,10 @@ static const struct spi_device_id m25p_i
|
||||
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
|
||||
|
||||
+ /* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
+ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) },
|
||||
+ { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) },
|
||||
+
|
||||
/* Spansion -- single (large) sector size only, at least
|
||||
* for the chips listed here (without boot sectors).
|
||||
*/
|
||||
@@ -858,6 +864,9 @@ static int __devinit m25p_probe(struct s
|
||||
if (info->flags & SECT_4K) {
|
||||
flash->erase_opcode = OPCODE_BE_4K;
|
||||
flash->mtd.erasesize = 4096;
|
||||
+ } else if (info->flags & SECT_4K_PMC) {
|
||||
+ flash->erase_opcode = OPCODE_BE_4K_PMC;
|
||||
+ flash->mtd.erasesize = 4096;
|
||||
} else {
|
||||
flash->erase_opcode = OPCODE_SE;
|
||||
flash->mtd.erasesize = info->sector_size;
|
|
@ -1,13 +0,0 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -648,6 +648,10 @@ static const struct spi_device_id m25p_i
|
||||
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
|
||||
|
||||
+ /* EON -- en25pxx */
|
||||
+ { "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
|
||||
+ { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
|
||||
+
|
||||
/* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
{ "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) },
|
||||
{ "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) },
|
|
@ -1,28 +0,0 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -652,6 +652,11 @@ static const struct spi_device_id m25p_i
|
||||
{ "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
|
||||
{ "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
|
||||
|
||||
+ /* Numonyx -- xxxs33b */
|
||||
+ { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) },
|
||||
+ { "320s33b", INFO(0x898912, 0, 64 * 1024, 64, 0) },
|
||||
+ { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, 0) },
|
||||
+
|
||||
/* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
{ "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) },
|
||||
{ "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) },
|
||||
@@ -836,11 +841,12 @@ static int __devinit m25p_probe(struct s
|
||||
dev_set_drvdata(&spi->dev, flash);
|
||||
|
||||
/*
|
||||
- * Atmel and SST serial flash tend to power
|
||||
+ * Atmel, SST and Intel/Numonyx serial flash tend to power
|
||||
* up with the software protection bits set
|
||||
*/
|
||||
|
||||
if (info->jedec_id >> 16 == 0x1f ||
|
||||
+ info->jedec_id >> 16 == 0x89 ||
|
||||
info->jedec_id >> 16 == 0xbf) {
|
||||
write_enable(flash);
|
||||
write_sr(flash, 0);
|
|
@ -1,10 +0,0 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -709,6 +709,7 @@ static const struct spi_device_id m25p_i
|
||||
{ "w25x80", INFO(0xef3014, 0, 64 * 1024, 16, SECT_4K) },
|
||||
{ "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) },
|
||||
{ "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
+ { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
|
||||
/* Catalyst / On Semiconductor -- non-JEDEC */
|
|
@ -1,10 +0,0 @@
|
|||
--- a/drivers/mtd/chips/gen_probe.c
|
||||
+++ b/drivers/mtd/chips/gen_probe.c
|
||||
@@ -249,6 +249,7 @@ static struct mtd_info *check_cmd_set(st
|
||||
#endif
|
||||
#ifdef CONFIG_MTD_CFI_AMDSTD
|
||||
case 0x0002:
|
||||
+ case 0x0006:
|
||||
return cfi_cmdset_0002(map, primary);
|
||||
#endif
|
||||
#ifdef CONFIG_MTD_CFI_STAA
|
|
@ -1,37 +0,0 @@
|
|||
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
@@ -327,9 +327,32 @@ static void cfi_fixup_major_minor(struct
|
||||
{
|
||||
// manufacturers defined in include/linux/mtd/cfi.h
|
||||
|
||||
- if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e &&
|
||||
- extp->MajorVersion == '0')
|
||||
+ if (cfi->mfr == CFI_MFR_SAMSUNG &&
|
||||
+ extp->MajorVersion == '0') {
|
||||
+ printk(" Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
+
|
||||
extp->MajorVersion = '1';
|
||||
+ extp->MinorVersion = '0';
|
||||
+
|
||||
+ printk(" to %c.%c.\n",
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
+ }
|
||||
+
|
||||
+ if (cfi->mfr == CFI_MFR_SAMSUNG &&
|
||||
+ extp->MajorVersion == '3' && extp->MinorVersion == '3') {
|
||||
+ printk(KERN_NOTICE " Newer Samsung flash detected, "
|
||||
+ "should be compatibile with Amd/Fujitsu.\n");
|
||||
+
|
||||
+ printk(" Fixed Samsung's Amd/Fujitsu Extended Query version from %c.%c",
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
+
|
||||
+ extp->MajorVersion = '1'; // set to 1.3 (last defined version)
|
||||
+ extp->MinorVersion = '3';
|
||||
+
|
||||
+ printk(" to %c.%c.\n",
|
||||
+ extp->MajorVersion, extp->MinorVersion);
|
||||
+ }
|
||||
}
|
||||
|
||||
struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
|
|
@ -1,12 +0,0 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -648,7 +648,8 @@ static const struct spi_device_id m25p_i
|
||||
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
|
||||
|
||||
- /* EON -- en25pxx */
|
||||
+ /* EON -- en25xxx */
|
||||
+ { "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
|
||||
{ "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,108 +0,0 @@
|
|||
--- a/include/linux/netfilter/xt_layer7.h
|
||||
+++ b/include/linux/netfilter/xt_layer7.h
|
||||
@@ -8,6 +8,7 @@ struct xt_layer7_info {
|
||||
char protocol[MAX_PROTOCOL_LEN];
|
||||
char pattern[MAX_PATTERN_LEN];
|
||||
u_int8_t invert;
|
||||
+ u_int8_t pkt;
|
||||
};
|
||||
|
||||
#endif /* _XT_LAYER7_H */
|
||||
--- a/net/netfilter/xt_layer7.c
|
||||
+++ b/net/netfilter/xt_layer7.c
|
||||
@@ -314,33 +314,35 @@ static int match_no_append(struct nf_con
|
||||
}
|
||||
|
||||
/* add the new app data to the conntrack. Return number of bytes added. */
|
||||
-static int add_data(struct nf_conn * master_conntrack,
|
||||
- char * app_data, int appdatalen)
|
||||
+static int add_datastr(char *target, int offset, char *app_data, int len)
|
||||
{
|
||||
int length = 0, i;
|
||||
- int oldlength = master_conntrack->layer7.app_data_len;
|
||||
-
|
||||
- /* This is a fix for a race condition by Deti Fliegl. However, I'm not
|
||||
- clear on whether the race condition exists or whether this really
|
||||
- fixes it. I might just be being dense... Anyway, if it's not really
|
||||
- a fix, all it does is waste a very small amount of time. */
|
||||
- if(!master_conntrack->layer7.app_data) return 0;
|
||||
+ if (!target) return 0;
|
||||
|
||||
/* Strip nulls. Make everything lower case (our regex lib doesn't
|
||||
do case insensitivity). Add it to the end of the current data. */
|
||||
- for(i = 0; i < maxdatalen-oldlength-1 &&
|
||||
- i < appdatalen; i++) {
|
||||
+ for(i = 0; i < maxdatalen-offset-1 && i < len; i++) {
|
||||
if(app_data[i] != '\0') {
|
||||
/* the kernel version of tolower mungs 'upper ascii' */
|
||||
- master_conntrack->layer7.app_data[length+oldlength] =
|
||||
+ target[length+offset] =
|
||||
isascii(app_data[i])?
|
||||
tolower(app_data[i]) : app_data[i];
|
||||
length++;
|
||||
}
|
||||
}
|
||||
+ target[length+offset] = '\0';
|
||||
+
|
||||
+ return length;
|
||||
+}
|
||||
+
|
||||
+/* add the new app data to the conntrack. Return number of bytes added. */
|
||||
+static int add_data(struct nf_conn * master_conntrack,
|
||||
+ char * app_data, int appdatalen)
|
||||
+{
|
||||
+ int length;
|
||||
|
||||
- master_conntrack->layer7.app_data[length+oldlength] = '\0';
|
||||
- master_conntrack->layer7.app_data_len = length + oldlength;
|
||||
+ length = add_datastr(master_conntrack->layer7.app_data, master_conntrack->layer7.app_data_len, app_data, appdatalen);
|
||||
+ master_conntrack->layer7.app_data_len += length;
|
||||
|
||||
return length;
|
||||
}
|
||||
@@ -438,7 +440,7 @@ match(const struct sk_buff *skbin,
|
||||
|
||||
enum ip_conntrack_info master_ctinfo, ctinfo;
|
||||
struct nf_conn *master_conntrack, *conntrack;
|
||||
- unsigned char * app_data;
|
||||
+ unsigned char *app_data, *tmp_data;
|
||||
unsigned int pattern_result, appdatalen;
|
||||
regexp * comppattern;
|
||||
|
||||
@@ -466,8 +468,8 @@ match(const struct sk_buff *skbin,
|
||||
master_conntrack = master_ct(master_conntrack);
|
||||
|
||||
/* if we've classified it or seen too many packets */
|
||||
- if(total_acct_packets(master_conntrack) > num_packets ||
|
||||
- master_conntrack->layer7.app_proto) {
|
||||
+ if(!info->pkt && (total_acct_packets(master_conntrack) > num_packets ||
|
||||
+ master_conntrack->layer7.app_proto)) {
|
||||
|
||||
pattern_result = match_no_append(conntrack, master_conntrack,
|
||||
ctinfo, master_ctinfo, info);
|
||||
@@ -500,6 +502,25 @@ match(const struct sk_buff *skbin,
|
||||
/* the return value gets checked later, when we're ready to use it */
|
||||
comppattern = compile_and_cache(info->pattern, info->protocol);
|
||||
|
||||
+ if (info->pkt) {
|
||||
+ tmp_data = kmalloc(maxdatalen, GFP_ATOMIC);
|
||||
+ if(!tmp_data){
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
|
||||
+ return info->invert;
|
||||
+ }
|
||||
+
|
||||
+ tmp_data[0] = '\0';
|
||||
+ add_datastr(tmp_data, 0, app_data, appdatalen);
|
||||
+ pattern_result = ((comppattern && regexec(comppattern, tmp_data)) ? 1 : 0);
|
||||
+
|
||||
+ kfree(tmp_data);
|
||||
+ tmp_data = NULL;
|
||||
+ spin_unlock_bh(&l7_lock);
|
||||
+
|
||||
+ return (pattern_result ^ info->invert);
|
||||
+ }
|
||||
+
|
||||
/* On the first packet of a connection, allocate space for app data */
|
||||
if(total_acct_packets(master_conntrack) == 1 && !skb->cb[0] &&
|
||||
!master_conntrack->layer7.app_data){
|
|
@ -1,144 +0,0 @@
|
|||
--- a/include/linux/netfilter_ipv4/ip_tables.h
|
||||
+++ b/include/linux/netfilter_ipv4/ip_tables.h
|
||||
@@ -62,6 +62,7 @@ struct ipt_ip {
|
||||
#define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */
|
||||
#define IPT_F_GOTO 0x02 /* Set if jump is a goto */
|
||||
#define IPT_F_MASK 0x03 /* All possible flag bits mask. */
|
||||
+#define IPT_F_NO_DEF_MATCH 0x80 /* Internal: no default match rules present */
|
||||
|
||||
/* Values for "inv" field in struct ipt_ip. */
|
||||
#define IPT_INV_VIA_IN 0x01 /* Invert the sense of IN IFACE. */
|
||||
--- a/net/ipv4/netfilter/ip_tables.c
|
||||
+++ b/net/ipv4/netfilter/ip_tables.c
|
||||
@@ -95,6 +95,9 @@ ip_packet_match(const struct iphdr *ip,
|
||||
|
||||
#define FWINV(bool, invflg) ((bool) ^ !!(ipinfo->invflags & (invflg)))
|
||||
|
||||
+ if (ipinfo->flags & IPT_F_NO_DEF_MATCH)
|
||||
+ return true;
|
||||
+
|
||||
if (FWINV((ip->saddr&ipinfo->smsk.s_addr) != ipinfo->src.s_addr,
|
||||
IPT_INV_SRCIP) ||
|
||||
FWINV((ip->daddr&ipinfo->dmsk.s_addr) != ipinfo->dst.s_addr,
|
||||
@@ -145,13 +148,35 @@ ip_packet_match(const struct iphdr *ip,
|
||||
return false;
|
||||
}
|
||||
|
||||
+#undef FWINV
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
-ip_checkentry(const struct ipt_ip *ip)
|
||||
+ip_checkentry(struct ipt_ip *ip)
|
||||
{
|
||||
- if (ip->flags & ~IPT_F_MASK) {
|
||||
+#define FWINV(bool, invflg) ((bool) || (ip->invflags & (invflg)))
|
||||
+
|
||||
+ if (FWINV(ip->smsk.s_addr, IPT_INV_SRCIP) ||
|
||||
+ FWINV(ip->dmsk.s_addr, IPT_INV_DSTIP))
|
||||
+ goto has_match_rules;
|
||||
+
|
||||
+ if (FWINV(!!((const unsigned long *)ip->iniface_mask)[0],
|
||||
+ IPT_INV_VIA_IN) ||
|
||||
+ FWINV(!!((const unsigned long *)ip->outiface_mask)[0],
|
||||
+ IPT_INV_VIA_OUT))
|
||||
+ goto has_match_rules;
|
||||
+
|
||||
+ if (FWINV(ip->proto, IPT_INV_PROTO))
|
||||
+ goto has_match_rules;
|
||||
+
|
||||
+ if (FWINV(ip->flags&IPT_F_FRAG, IPT_INV_FRAG))
|
||||
+ goto has_match_rules;
|
||||
+
|
||||
+ ip->flags |= IPT_F_NO_DEF_MATCH;
|
||||
+
|
||||
+has_match_rules:
|
||||
+ if (ip->flags & ~(IPT_F_MASK|IPT_F_NO_DEF_MATCH)) {
|
||||
duprintf("Unknown flag bits set: %08X\n",
|
||||
ip->flags & ~IPT_F_MASK);
|
||||
return false;
|
||||
@@ -161,6 +186,8 @@ ip_checkentry(const struct ipt_ip *ip)
|
||||
ip->invflags & ~IPT_INV_MASK);
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+#undef FWINV
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -203,7 +230,6 @@ static inline bool unconditional(const s
|
||||
static const struct ipt_ip uncond;
|
||||
|
||||
return memcmp(ip, &uncond, sizeof(uncond)) == 0;
|
||||
-#undef FWINV
|
||||
}
|
||||
|
||||
/* for const-correctness */
|
||||
@@ -336,8 +362,28 @@ ipt_do_table(struct sk_buff *skb,
|
||||
struct xt_match_param mtpar;
|
||||
struct xt_target_param tgpar;
|
||||
|
||||
- /* Initialization */
|
||||
ip = ip_hdr(skb);
|
||||
+
|
||||
+ IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
||||
+ xt_info_rdlock_bh();
|
||||
+ private = table->private;
|
||||
+ table_base = private->entries[smp_processor_id()];
|
||||
+ e = get_entry(table_base, private->hook_entry[hook]);
|
||||
+
|
||||
+ if (e->target_offset <= sizeof(struct ipt_entry) &&
|
||||
+ (e->ip.flags & IPT_F_NO_DEF_MATCH)) {
|
||||
+ struct ipt_entry_target *t = ipt_get_target(e);
|
||||
+ if (!t->u.kernel.target->target) {
|
||||
+ int v = ((struct ipt_standard_target *)t)->verdict;
|
||||
+ if ((v < 0) && (v != IPT_RETURN)) {
|
||||
+ ADD_COUNTER(e->counters, ntohs(ip->tot_len), 1);
|
||||
+ xt_info_rdunlock_bh();
|
||||
+ return (unsigned)(-v) - 1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Initialization */
|
||||
indev = in ? in->name : nulldevname;
|
||||
outdev = out ? out->name : nulldevname;
|
||||
/* We handle fragments by dealing with the first fragment as
|
||||
@@ -354,13 +400,6 @@ ipt_do_table(struct sk_buff *skb,
|
||||
mtpar.family = tgpar.family = NFPROTO_IPV4;
|
||||
mtpar.hooknum = tgpar.hooknum = hook;
|
||||
|
||||
- IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
||||
- xt_info_rdlock_bh();
|
||||
- private = table->private;
|
||||
- table_base = private->entries[smp_processor_id()];
|
||||
-
|
||||
- e = get_entry(table_base, private->hook_entry[hook]);
|
||||
-
|
||||
/* For return from builtin chain */
|
||||
back = get_entry(table_base, private->underflow[hook]);
|
||||
|
||||
@@ -991,6 +1030,7 @@ copy_entries_to_user(unsigned int total_
|
||||
unsigned int i;
|
||||
const struct ipt_entry_match *m;
|
||||
const struct ipt_entry_target *t;
|
||||
+ u8 flags;
|
||||
|
||||
e = (struct ipt_entry *)(loc_cpu_entry + off);
|
||||
if (copy_to_user(userptr + off
|
||||
@@ -1000,6 +1040,14 @@ copy_entries_to_user(unsigned int total_
|
||||
ret = -EFAULT;
|
||||
goto free_counters;
|
||||
}
|
||||
+
|
||||
+ flags = e->ip.flags & ~IPT_F_NO_DEF_MATCH;
|
||||
+ if (copy_to_user(userptr + off
|
||||
+ + offsetof(struct ipt_entry, ip.flags),
|
||||
+ &flags, sizeof(flags)) != 0) {
|
||||
+ ret = -EFAULT;
|
||||
+ goto free_counters;
|
||||
+ }
|
||||
|
||||
for (i = sizeof(struct ipt_entry);
|
||||
i < e->target_offset;
|
|
@ -1,71 +0,0 @@
|
|||
--- a/include/linux/netfilter/xt_recent.h
|
||||
+++ b/include/linux/netfilter/xt_recent.h
|
||||
@@ -9,6 +9,7 @@ enum {
|
||||
XT_RECENT_UPDATE = 1 << 2,
|
||||
XT_RECENT_REMOVE = 1 << 3,
|
||||
XT_RECENT_TTL = 1 << 4,
|
||||
+ XT_RECENT_REAP = 1 << 5,
|
||||
|
||||
XT_RECENT_SOURCE = 0,
|
||||
XT_RECENT_DEST = 1,
|
||||
@@ -16,6 +17,9 @@ enum {
|
||||
XT_RECENT_NAME_LEN = 200,
|
||||
};
|
||||
|
||||
+/* Only allowed with --rcheck and --update */
|
||||
+#define XT_RECENT_MODIFIERS (XT_RECENT_TTL|XT_RECENT_REAP)
|
||||
+
|
||||
struct xt_recent_mtinfo {
|
||||
__u32 seconds;
|
||||
__u32 hit_count;
|
||||
--- a/net/netfilter/xt_recent.c
|
||||
+++ b/net/netfilter/xt_recent.c
|
||||
@@ -147,6 +147,25 @@ static void recent_entry_remove(struct r
|
||||
t->entries--;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Drop entries with timestamps older then 'time'.
|
||||
+ */
|
||||
+static void recent_entry_reap(struct recent_table *t, unsigned long time)
|
||||
+{
|
||||
+ struct recent_entry *e;
|
||||
+
|
||||
+ /*
|
||||
+ * The head of the LRU list is always the oldest entry.
|
||||
+ */
|
||||
+ e = list_entry(t->lru_list.next, struct recent_entry, lru_list);
|
||||
+
|
||||
+ /*
|
||||
+ * The last time stamp is the most recent.
|
||||
+ */
|
||||
+ if (time_after(time, e->stamps[e->index-1]))
|
||||
+ recent_entry_remove(t, e);
|
||||
+}
|
||||
+
|
||||
static struct recent_entry *
|
||||
recent_entry_init(struct recent_table *t, const union nf_inet_addr *addr,
|
||||
u_int16_t family, u_int8_t ttl)
|
||||
@@ -273,6 +292,10 @@ recent_mt(const struct sk_buff *skb, con
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /* info->seconds must be non-zero */
|
||||
+ if (info->check_set & XT_RECENT_REAP)
|
||||
+ recent_entry_reap(t, time);
|
||||
}
|
||||
|
||||
if (info->check_set & XT_RECENT_SET ||
|
||||
@@ -305,7 +328,10 @@ static bool recent_mt_check(const struct
|
||||
XT_RECENT_CHECK | XT_RECENT_UPDATE)) != 1)
|
||||
return false;
|
||||
if ((info->check_set & (XT_RECENT_SET | XT_RECENT_REMOVE)) &&
|
||||
- (info->seconds || info->hit_count))
|
||||
+ (info->seconds || info->hit_count ||
|
||||
+ (info->check_set & XT_RECENT_MODIFIERS)))
|
||||
+ return false;
|
||||
+ if ((info->check_set & XT_RECENT_REAP) && !info->seconds)
|
||||
return false;
|
||||
if (info->hit_count > ip_pkt_list_tot) {
|
||||
pr_info(KBUILD_MODNAME ": hitcount (%u) is larger than "
|
|
@ -1,18 +0,0 @@
|
|||
--- a/net/netfilter/Kconfig
|
||||
+++ b/net/netfilter/Kconfig
|
||||
@@ -173,7 +173,6 @@ config NF_CONNTRACK_FTP
|
||||
|
||||
config NF_CONNTRACK_H323
|
||||
tristate "H.323 protocol support"
|
||||
- depends on (IPV6 || IPV6=n)
|
||||
depends on NETFILTER_ADVANCED
|
||||
help
|
||||
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
|
||||
@@ -518,7 +517,6 @@ config NETFILTER_XT_TARGET_SECMARK
|
||||
|
||||
config NETFILTER_XT_TARGET_TCPMSS
|
||||
tristate '"TCPMSS" target support'
|
||||
- depends on (IPV6 || IPV6=n)
|
||||
default m if NETFILTER_ADVANCED=n
|
||||
---help---
|
||||
This option adds a `TCPMSS' target, which allows you to alter the
|
File diff suppressed because it is too large
Load diff
|
@ -1,50 +0,0 @@
|
|||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -4,6 +4,8 @@
|
||||
/*
|
||||
* 'kernel.h' contains some often-used function prototypes etc
|
||||
*/
|
||||
+#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
|
||||
+#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
@@ -37,8 +39,8 @@ extern const char linux_proc_banner[];
|
||||
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
-#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
|
||||
-#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
|
||||
+#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
|
||||
+#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask))
|
||||
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
|
||||
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
|
||||
|
||||
--- a/include/linux/netfilter/x_tables.h
|
||||
+++ b/include/linux/netfilter/x_tables.h
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _X_TABLES_H
|
||||
#define _X_TABLES_H
|
||||
-
|
||||
+#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define XT_FUNCTION_MAXNAMELEN 30
|
||||
@@ -93,7 +93,7 @@ struct _xt_align {
|
||||
__u64 u64;
|
||||
};
|
||||
|
||||
-#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
|
||||
+#define XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _xt_align))
|
||||
|
||||
/* Standard return verdict, or do jump. */
|
||||
#define XT_STANDARD_TARGET ""
|
||||
@@ -598,7 +598,7 @@ struct _compat_xt_align {
|
||||
compat_u64 u64;
|
||||
};
|
||||
|
||||
-#define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align))
|
||||
+#define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align))
|
||||
|
||||
extern void xt_compat_lock(u_int8_t af);
|
||||
extern void xt_compat_unlock(u_int8_t af);
|
|
@ -1,795 +0,0 @@
|
|||
--- a/include/linux/pkt_sched.h
|
||||
+++ b/include/linux/pkt_sched.h
|
||||
@@ -173,8 +173,37 @@ struct tc_sfq_xstats {
|
||||
*
|
||||
* The only reason for this is efficiency, it is possible
|
||||
* to change these parameters in compile time.
|
||||
+ *
|
||||
+ * If you need to play with these values, use esfq instead.
|
||||
*/
|
||||
|
||||
+/* ESFQ section */
|
||||
+
|
||||
+enum
|
||||
+{
|
||||
+ /* traditional */
|
||||
+ TCA_SFQ_HASH_CLASSIC,
|
||||
+ TCA_SFQ_HASH_DST,
|
||||
+ TCA_SFQ_HASH_SRC,
|
||||
+ TCA_SFQ_HASH_FWMARK,
|
||||
+ /* conntrack */
|
||||
+ TCA_SFQ_HASH_CTORIGDST,
|
||||
+ TCA_SFQ_HASH_CTORIGSRC,
|
||||
+ TCA_SFQ_HASH_CTREPLDST,
|
||||
+ TCA_SFQ_HASH_CTREPLSRC,
|
||||
+ TCA_SFQ_HASH_CTNATCHG,
|
||||
+};
|
||||
+
|
||||
+struct tc_esfq_qopt
|
||||
+{
|
||||
+ unsigned quantum; /* Bytes per round allocated to flow */
|
||||
+ int perturb_period; /* Period of hash perturbation */
|
||||
+ __u32 limit; /* Maximal packets in queue */
|
||||
+ unsigned divisor; /* Hash divisor */
|
||||
+ unsigned flows; /* Maximal number of flows */
|
||||
+ unsigned hash_kind; /* Hash function to use for flow identification */
|
||||
+};
|
||||
+
|
||||
/* RED section */
|
||||
|
||||
enum {
|
||||
--- a/net/sched/Kconfig
|
||||
+++ b/net/sched/Kconfig
|
||||
@@ -137,6 +137,37 @@ config NET_SCH_SFQ
|
||||
To compile this code as a module, choose M here: the
|
||||
module will be called sch_sfq.
|
||||
|
||||
+config NET_SCH_ESFQ
|
||||
+ tristate "Enhanced Stochastic Fairness Queueing (ESFQ)"
|
||||
+ ---help---
|
||||
+ Say Y here if you want to use the Enhanced Stochastic Fairness
|
||||
+ Queueing (ESFQ) packet scheduling algorithm for some of your network
|
||||
+ devices or as a leaf discipline for a classful qdisc such as HTB or
|
||||
+ CBQ (see the top of <file:net/sched/sch_esfq.c> for details and
|
||||
+ references to the SFQ algorithm).
|
||||
+
|
||||
+ This is an enchanced SFQ version which allows you to control some
|
||||
+ hardcoded values in the SFQ scheduler.
|
||||
+
|
||||
+ ESFQ also adds control of the hash function used to identify packet
|
||||
+ flows. The original SFQ discipline hashes by connection; ESFQ add
|
||||
+ several other hashing methods, such as by src IP or by dst IP, which
|
||||
+ can be more fair to users in some networking situations.
|
||||
+
|
||||
+ To compile this code as a module, choose M here: the
|
||||
+ module will be called sch_esfq.
|
||||
+
|
||||
+config NET_SCH_ESFQ_NFCT
|
||||
+ bool "Connection Tracking Hash Types"
|
||||
+ depends on NET_SCH_ESFQ && NF_CONNTRACK
|
||||
+ ---help---
|
||||
+ Say Y here to enable support for hashing based on netfilter connection
|
||||
+ tracking information. This is useful for a router that is also using
|
||||
+ NAT to connect privately-addressed hosts to the Internet. If you want
|
||||
+ to provide fair distribution of upstream bandwidth, ESFQ must use
|
||||
+ connection tracking information, since all outgoing packets will share
|
||||
+ the same source address.
|
||||
+
|
||||
config NET_SCH_TEQL
|
||||
tristate "True Link Equalizer (TEQL)"
|
||||
---help---
|
||||
--- a/net/sched/Makefile
|
||||
+++ b/net/sched/Makefile
|
||||
@@ -24,6 +24,7 @@ obj-$(CONFIG_NET_SCH_GRED) += sch_gred.o
|
||||
obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o
|
||||
obj-$(CONFIG_NET_SCH_DSMARK) += sch_dsmark.o
|
||||
obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o
|
||||
+obj-$(CONFIG_NET_SCH_ESFQ) += sch_esfq.o
|
||||
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
|
||||
obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o
|
||||
obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o
|
||||
--- /dev/null
|
||||
+++ b/net/sched/sch_esfq.c
|
||||
@@ -0,0 +1,702 @@
|
||||
+/*
|
||||
+ * net/sched/sch_esfq.c Extended Stochastic Fairness Queueing discipline.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
|
||||
+ *
|
||||
+ * Changes: Alexander Atanasov, <alex@ssi.bg>
|
||||
+ * Added dynamic depth,limit,divisor,hash_kind options.
|
||||
+ * Added dst and src hashes.
|
||||
+ *
|
||||
+ * Alexander Clouter, <alex@digriz.org.uk>
|
||||
+ * Ported ESFQ to Linux 2.6.
|
||||
+ *
|
||||
+ * Corey Hickey, <bugfood-c@fatooh.org>
|
||||
+ * Maintenance of the Linux 2.6 port.
|
||||
+ * Added fwmark hash (thanks to Robert Kurjata).
|
||||
+ * Added usage of jhash.
|
||||
+ * Added conntrack support.
|
||||
+ * Added ctnatchg hash (thanks to Ben Pfountz).
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <asm/uaccess.h>
|
||||
+#include <asm/system.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/jiffies.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/socket.h>
|
||||
+#include <linux/sockios.h>
|
||||
+#include <linux/in.h>
|
||||
+#include <linux/errno.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/if_ether.h>
|
||||
+#include <linux/inet.h>
|
||||
+#include <linux/netdevice.h>
|
||||
+#include <linux/etherdevice.h>
|
||||
+#include <linux/notifier.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <net/ip.h>
|
||||
+#include <net/netlink.h>
|
||||
+#include <linux/ipv6.h>
|
||||
+#include <net/route.h>
|
||||
+#include <linux/skbuff.h>
|
||||
+#include <net/sock.h>
|
||||
+#include <net/pkt_sched.h>
|
||||
+#include <linux/jhash.h>
|
||||
+#ifdef CONFIG_NET_SCH_ESFQ_NFCT
|
||||
+#include <net/netfilter/nf_conntrack.h>
|
||||
+#endif
|
||||
+
|
||||
+/* Stochastic Fairness Queuing algorithm.
|
||||
+ For more comments look at sch_sfq.c.
|
||||
+ The difference is that you can change limit, depth,
|
||||
+ hash table size and choose alternate hash types.
|
||||
+
|
||||
+ classic: same as in sch_sfq.c
|
||||
+ dst: destination IP address
|
||||
+ src: source IP address
|
||||
+ fwmark: netfilter mark value
|
||||
+ ctorigdst: original destination IP address
|
||||
+ ctorigsrc: original source IP address
|
||||
+ ctrepldst: reply destination IP address
|
||||
+ ctreplsrc: reply source IP
|
||||
+
|
||||
+*/
|
||||
+
|
||||
+#define ESFQ_HEAD 0
|
||||
+#define ESFQ_TAIL 1
|
||||
+
|
||||
+/* This type should contain at least SFQ_DEPTH*2 values */
|
||||
+typedef unsigned int esfq_index;
|
||||
+
|
||||
+struct esfq_head
|
||||
+{
|
||||
+ esfq_index next;
|
||||
+ esfq_index prev;
|
||||
+};
|
||||
+
|
||||
+struct esfq_sched_data
|
||||
+{
|
||||
+/* Parameters */
|
||||
+ int perturb_period;
|
||||
+ unsigned quantum; /* Allotment per round: MUST BE >= MTU */
|
||||
+ int limit;
|
||||
+ unsigned depth;
|
||||
+ unsigned hash_divisor;
|
||||
+ unsigned hash_kind;
|
||||
+/* Variables */
|
||||
+ struct timer_list perturb_timer;
|
||||
+ int perturbation;
|
||||
+ esfq_index tail; /* Index of current slot in round */
|
||||
+ esfq_index max_depth; /* Maximal depth */
|
||||
+
|
||||
+ esfq_index *ht; /* Hash table */
|
||||
+ esfq_index *next; /* Active slots link */
|
||||
+ short *allot; /* Current allotment per slot */
|
||||
+ unsigned short *hash; /* Hash value indexed by slots */
|
||||
+ struct sk_buff_head *qs; /* Slot queue */
|
||||
+ struct esfq_head *dep; /* Linked list of slots, indexed by depth */
|
||||
+};
|
||||
+
|
||||
+/* This contains the info we will hash. */
|
||||
+struct esfq_packet_info
|
||||
+{
|
||||
+ u32 proto; /* protocol or port */
|
||||
+ u32 src; /* source from packet header */
|
||||
+ u32 dst; /* destination from packet header */
|
||||
+ u32 ctorigsrc; /* original source from conntrack */
|
||||
+ u32 ctorigdst; /* original destination from conntrack */
|
||||
+ u32 ctreplsrc; /* reply source from conntrack */
|
||||
+ u32 ctrepldst; /* reply destination from conntrack */
|
||||
+ u32 mark; /* netfilter mark (fwmark) */
|
||||
+};
|
||||
+
|
||||
+static __inline__ unsigned esfq_jhash_1word(struct esfq_sched_data *q,u32 a)
|
||||
+{
|
||||
+ return jhash_1word(a, q->perturbation) & (q->hash_divisor-1);
|
||||
+}
|
||||
+
|
||||
+static __inline__ unsigned esfq_jhash_2words(struct esfq_sched_data *q, u32 a, u32 b)
|
||||
+{
|
||||
+ return jhash_2words(a, b, q->perturbation) & (q->hash_divisor-1);
|
||||
+}
|
||||
+
|
||||
+static __inline__ unsigned esfq_jhash_3words(struct esfq_sched_data *q, u32 a, u32 b, u32 c)
|
||||
+{
|
||||
+ return jhash_3words(a, b, c, q->perturbation) & (q->hash_divisor-1);
|
||||
+}
|
||||
+
|
||||
+static unsigned esfq_hash(struct esfq_sched_data *q, struct sk_buff *skb)
|
||||
+{
|
||||
+ struct esfq_packet_info info;
|
||||
+#ifdef CONFIG_NET_SCH_ESFQ_NFCT
|
||||
+ enum ip_conntrack_info ctinfo;
|
||||
+ struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
|
||||
+#endif
|
||||
+
|
||||
+ switch (skb->protocol) {
|
||||
+ case __constant_htons(ETH_P_IP):
|
||||
+ {
|
||||
+ struct iphdr *iph = ip_hdr(skb);
|
||||
+ info.dst = iph->daddr;
|
||||
+ info.src = iph->saddr;
|
||||
+ if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
|
||||
+ (iph->protocol == IPPROTO_TCP ||
|
||||
+ iph->protocol == IPPROTO_UDP ||
|
||||
+ iph->protocol == IPPROTO_SCTP ||
|
||||
+ iph->protocol == IPPROTO_DCCP ||
|
||||
+ iph->protocol == IPPROTO_ESP))
|
||||
+ info.proto = *(((u32*)iph) + iph->ihl);
|
||||
+ else
|
||||
+ info.proto = iph->protocol;
|
||||
+ break;
|
||||
+ }
|
||||
+ case __constant_htons(ETH_P_IPV6):
|
||||
+ {
|
||||
+ struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
+ /* Hash ipv6 addresses into a u32. This isn't ideal,
|
||||
+ * but the code is simple. */
|
||||
+ info.dst = jhash2(iph->daddr.s6_addr32, 4, q->perturbation);
|
||||
+ info.src = jhash2(iph->saddr.s6_addr32, 4, q->perturbation);
|
||||
+ if (iph->nexthdr == IPPROTO_TCP ||
|
||||
+ iph->nexthdr == IPPROTO_UDP ||
|
||||
+ iph->nexthdr == IPPROTO_SCTP ||
|
||||
+ iph->nexthdr == IPPROTO_DCCP ||
|
||||
+ iph->nexthdr == IPPROTO_ESP)
|
||||
+ info.proto = *(u32*)&iph[1];
|
||||
+ else
|
||||
+ info.proto = iph->nexthdr;
|
||||
+ break;
|
||||
+ }
|
||||
+ default:
|
||||
+ info.dst = (u32)(unsigned long)skb_dst(skb);
|
||||
+ info.src = (u32)(unsigned long)skb->sk;
|
||||
+ info.proto = skb->protocol;
|
||||
+ }
|
||||
+
|
||||
+ info.mark = skb->mark;
|
||||
+
|
||||
+#ifdef CONFIG_NET_SCH_ESFQ_NFCT
|
||||
+ /* defaults if there is no conntrack info */
|
||||
+ info.ctorigsrc = info.src;
|
||||
+ info.ctorigdst = info.dst;
|
||||
+ info.ctreplsrc = info.dst;
|
||||
+ info.ctrepldst = info.src;
|
||||
+ /* collect conntrack info */
|
||||
+ if (ct && ct != &nf_conntrack_untracked) {
|
||||
+ if (skb->protocol == __constant_htons(ETH_P_IP)) {
|
||||
+ info.ctorigsrc = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip;
|
||||
+ info.ctorigdst = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3.ip;
|
||||
+ info.ctreplsrc = ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip;
|
||||
+ info.ctrepldst = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip;
|
||||
+ }
|
||||
+ else if (skb->protocol == __constant_htons(ETH_P_IPV6)) {
|
||||
+ /* Again, hash ipv6 addresses into a single u32. */
|
||||
+ info.ctorigsrc = jhash2(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6, 4, q->perturbation);
|
||||
+ info.ctorigdst = jhash2(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3.ip6, 4, q->perturbation);
|
||||
+ info.ctreplsrc = jhash2(ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip6, 4, q->perturbation);
|
||||
+ info.ctrepldst = jhash2(ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip6, 4, q->perturbation);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ switch(q->hash_kind) {
|
||||
+ case TCA_SFQ_HASH_CLASSIC:
|
||||
+ return esfq_jhash_3words(q, info.dst, info.src, info.proto);
|
||||
+ case TCA_SFQ_HASH_DST:
|
||||
+ return esfq_jhash_1word(q, info.dst);
|
||||
+ case TCA_SFQ_HASH_SRC:
|
||||
+ return esfq_jhash_1word(q, info.src);
|
||||
+ case TCA_SFQ_HASH_FWMARK:
|
||||
+ return esfq_jhash_1word(q, info.mark);
|
||||
+#ifdef CONFIG_NET_SCH_ESFQ_NFCT
|
||||
+ case TCA_SFQ_HASH_CTORIGDST:
|
||||
+ return esfq_jhash_1word(q, info.ctorigdst);
|
||||
+ case TCA_SFQ_HASH_CTORIGSRC:
|
||||
+ return esfq_jhash_1word(q, info.ctorigsrc);
|
||||
+ case TCA_SFQ_HASH_CTREPLDST:
|
||||
+ return esfq_jhash_1word(q, info.ctrepldst);
|
||||
+ case TCA_SFQ_HASH_CTREPLSRC:
|
||||
+ return esfq_jhash_1word(q, info.ctreplsrc);
|
||||
+ case TCA_SFQ_HASH_CTNATCHG:
|
||||
+ {
|
||||
+ if (info.ctorigdst == info.ctreplsrc)
|
||||
+ return esfq_jhash_1word(q, info.ctorigsrc);
|
||||
+ return esfq_jhash_1word(q, info.ctreplsrc);
|
||||
+ }
|
||||
+#endif
|
||||
+ default:
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_WARNING "ESFQ: Unknown hash method. Falling back to classic.\n");
|
||||
+ }
|
||||
+ return esfq_jhash_3words(q, info.dst, info.src, info.proto);
|
||||
+}
|
||||
+
|
||||
+static inline void esfq_link(struct esfq_sched_data *q, esfq_index x)
|
||||
+{
|
||||
+ esfq_index p, n;
|
||||
+ int d = q->qs[x].qlen + q->depth;
|
||||
+
|
||||
+ p = d;
|
||||
+ n = q->dep[d].next;
|
||||
+ q->dep[x].next = n;
|
||||
+ q->dep[x].prev = p;
|
||||
+ q->dep[p].next = q->dep[n].prev = x;
|
||||
+}
|
||||
+
|
||||
+static inline void esfq_dec(struct esfq_sched_data *q, esfq_index x)
|
||||
+{
|
||||
+ esfq_index p, n;
|
||||
+
|
||||
+ n = q->dep[x].next;
|
||||
+ p = q->dep[x].prev;
|
||||
+ q->dep[p].next = n;
|
||||
+ q->dep[n].prev = p;
|
||||
+
|
||||
+ if (n == p && q->max_depth == q->qs[x].qlen + 1)
|
||||
+ q->max_depth--;
|
||||
+
|
||||
+ esfq_link(q, x);
|
||||
+}
|
||||
+
|
||||
+static inline void esfq_inc(struct esfq_sched_data *q, esfq_index x)
|
||||
+{
|
||||
+ esfq_index p, n;
|
||||
+ int d;
|
||||
+
|
||||
+ n = q->dep[x].next;
|
||||
+ p = q->dep[x].prev;
|
||||
+ q->dep[p].next = n;
|
||||
+ q->dep[n].prev = p;
|
||||
+ d = q->qs[x].qlen;
|
||||
+ if (q->max_depth < d)
|
||||
+ q->max_depth = d;
|
||||
+
|
||||
+ esfq_link(q, x);
|
||||
+}
|
||||
+
|
||||
+static unsigned int esfq_drop(struct Qdisc *sch)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ esfq_index d = q->max_depth;
|
||||
+ struct sk_buff *skb;
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ /* Queue is full! Find the longest slot and
|
||||
+ drop a packet from it */
|
||||
+
|
||||
+ if (d > 1) {
|
||||
+ esfq_index x = q->dep[d+q->depth].next;
|
||||
+ skb = q->qs[x].prev;
|
||||
+ len = skb->len;
|
||||
+ __skb_unlink(skb, &q->qs[x]);
|
||||
+ kfree_skb(skb);
|
||||
+ esfq_dec(q, x);
|
||||
+ sch->q.qlen--;
|
||||
+ sch->qstats.drops++;
|
||||
+ sch->qstats.backlog -= len;
|
||||
+ return len;
|
||||
+ }
|
||||
+
|
||||
+ if (d == 1) {
|
||||
+ /* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */
|
||||
+ d = q->next[q->tail];
|
||||
+ q->next[q->tail] = q->next[d];
|
||||
+ q->allot[q->next[d]] += q->quantum;
|
||||
+ skb = q->qs[d].prev;
|
||||
+ len = skb->len;
|
||||
+ __skb_unlink(skb, &q->qs[d]);
|
||||
+ kfree_skb(skb);
|
||||
+ esfq_dec(q, d);
|
||||
+ sch->q.qlen--;
|
||||
+ q->ht[q->hash[d]] = q->depth;
|
||||
+ sch->qstats.drops++;
|
||||
+ sch->qstats.backlog -= len;
|
||||
+ return len;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void esfq_q_enqueue(struct sk_buff *skb, struct esfq_sched_data *q, unsigned int end)
|
||||
+{
|
||||
+ unsigned hash = esfq_hash(q, skb);
|
||||
+ unsigned depth = q->depth;
|
||||
+ esfq_index x;
|
||||
+
|
||||
+ x = q->ht[hash];
|
||||
+ if (x == depth) {
|
||||
+ q->ht[hash] = x = q->dep[depth].next;
|
||||
+ q->hash[x] = hash;
|
||||
+ }
|
||||
+
|
||||
+ if (end == ESFQ_TAIL)
|
||||
+ __skb_queue_tail(&q->qs[x], skb);
|
||||
+ else
|
||||
+ __skb_queue_head(&q->qs[x], skb);
|
||||
+
|
||||
+ esfq_inc(q, x);
|
||||
+ if (q->qs[x].qlen == 1) { /* The flow is new */
|
||||
+ if (q->tail == depth) { /* It is the first flow */
|
||||
+ q->tail = x;
|
||||
+ q->next[x] = x;
|
||||
+ q->allot[x] = q->quantum;
|
||||
+ } else {
|
||||
+ q->next[x] = q->next[q->tail];
|
||||
+ q->next[q->tail] = x;
|
||||
+ q->tail = x;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int esfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ esfq_q_enqueue(skb, q, ESFQ_TAIL);
|
||||
+ sch->qstats.backlog += skb->len;
|
||||
+ if (++sch->q.qlen < q->limit-1) {
|
||||
+ sch->bstats.bytes += skb->len;
|
||||
+ sch->bstats.packets++;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ sch->qstats.drops++;
|
||||
+ esfq_drop(sch);
|
||||
+ return NET_XMIT_CN;
|
||||
+}
|
||||
+
|
||||
+static struct sk_buff *esfq_peek(struct Qdisc* sch)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ esfq_index a;
|
||||
+
|
||||
+ /* No active slots */
|
||||
+ if (q->tail == q->depth)
|
||||
+ return NULL;
|
||||
+
|
||||
+ a = q->next[q->tail];
|
||||
+ return skb_peek(&q->qs[a]);
|
||||
+}
|
||||
+
|
||||
+static struct sk_buff *esfq_q_dequeue(struct esfq_sched_data *q)
|
||||
+{
|
||||
+ struct sk_buff *skb;
|
||||
+ unsigned depth = q->depth;
|
||||
+ esfq_index a, old_a;
|
||||
+
|
||||
+ /* No active slots */
|
||||
+ if (q->tail == depth)
|
||||
+ return NULL;
|
||||
+
|
||||
+ a = old_a = q->next[q->tail];
|
||||
+
|
||||
+ /* Grab packet */
|
||||
+ skb = __skb_dequeue(&q->qs[a]);
|
||||
+ esfq_dec(q, a);
|
||||
+
|
||||
+ /* Is the slot empty? */
|
||||
+ if (q->qs[a].qlen == 0) {
|
||||
+ q->ht[q->hash[a]] = depth;
|
||||
+ a = q->next[a];
|
||||
+ if (a == old_a) {
|
||||
+ q->tail = depth;
|
||||
+ return skb;
|
||||
+ }
|
||||
+ q->next[q->tail] = a;
|
||||
+ q->allot[a] += q->quantum;
|
||||
+ } else if ((q->allot[a] -= skb->len) <= 0) {
|
||||
+ q->tail = a;
|
||||
+ a = q->next[a];
|
||||
+ q->allot[a] += q->quantum;
|
||||
+ }
|
||||
+
|
||||
+ return skb;
|
||||
+}
|
||||
+
|
||||
+static struct sk_buff *esfq_dequeue(struct Qdisc* sch)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ skb = esfq_q_dequeue(q);
|
||||
+ if (skb == NULL)
|
||||
+ return NULL;
|
||||
+ sch->q.qlen--;
|
||||
+ sch->qstats.backlog -= skb->len;
|
||||
+ return skb;
|
||||
+}
|
||||
+
|
||||
+static void esfq_q_destroy(struct esfq_sched_data *q)
|
||||
+{
|
||||
+ del_timer(&q->perturb_timer);
|
||||
+ if(q->ht)
|
||||
+ kfree(q->ht);
|
||||
+ if(q->dep)
|
||||
+ kfree(q->dep);
|
||||
+ if(q->next)
|
||||
+ kfree(q->next);
|
||||
+ if(q->allot)
|
||||
+ kfree(q->allot);
|
||||
+ if(q->hash)
|
||||
+ kfree(q->hash);
|
||||
+ if(q->qs)
|
||||
+ kfree(q->qs);
|
||||
+}
|
||||
+
|
||||
+static void esfq_destroy(struct Qdisc *sch)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ esfq_q_destroy(q);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void esfq_reset(struct Qdisc* sch)
|
||||
+{
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ while ((skb = esfq_dequeue(sch)) != NULL)
|
||||
+ kfree_skb(skb);
|
||||
+}
|
||||
+
|
||||
+static void esfq_perturbation(unsigned long arg)
|
||||
+{
|
||||
+ struct Qdisc *sch = (struct Qdisc*)arg;
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+
|
||||
+ q->perturbation = net_random()&0x1F;
|
||||
+
|
||||
+ if (q->perturb_period) {
|
||||
+ q->perturb_timer.expires = jiffies + q->perturb_period;
|
||||
+ add_timer(&q->perturb_timer);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static unsigned int esfq_check_hash(unsigned int kind)
|
||||
+{
|
||||
+ switch (kind) {
|
||||
+ case TCA_SFQ_HASH_CTORIGDST:
|
||||
+ case TCA_SFQ_HASH_CTORIGSRC:
|
||||
+ case TCA_SFQ_HASH_CTREPLDST:
|
||||
+ case TCA_SFQ_HASH_CTREPLSRC:
|
||||
+ case TCA_SFQ_HASH_CTNATCHG:
|
||||
+#ifndef CONFIG_NET_SCH_ESFQ_NFCT
|
||||
+ {
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_WARNING "ESFQ: Conntrack hash types disabled in kernel config. Falling back to classic.\n");
|
||||
+ return TCA_SFQ_HASH_CLASSIC;
|
||||
+ }
|
||||
+#endif
|
||||
+ case TCA_SFQ_HASH_CLASSIC:
|
||||
+ case TCA_SFQ_HASH_DST:
|
||||
+ case TCA_SFQ_HASH_SRC:
|
||||
+ case TCA_SFQ_HASH_FWMARK:
|
||||
+ return kind;
|
||||
+ default:
|
||||
+ {
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_WARNING "ESFQ: Unknown hash type. Falling back to classic.\n");
|
||||
+ return TCA_SFQ_HASH_CLASSIC;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int esfq_q_init(struct esfq_sched_data *q, struct nlattr *opt)
|
||||
+{
|
||||
+ struct tc_esfq_qopt *ctl = nla_data(opt);
|
||||
+ esfq_index p = ~0U/2;
|
||||
+ int i;
|
||||
+
|
||||
+ if (opt && opt->nla_len < nla_attr_size(sizeof(*ctl)))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ q->perturbation = 0;
|
||||
+ q->hash_kind = TCA_SFQ_HASH_CLASSIC;
|
||||
+ q->max_depth = 0;
|
||||
+ if (opt == NULL) {
|
||||
+ q->perturb_period = 0;
|
||||
+ q->hash_divisor = 1024;
|
||||
+ q->tail = q->limit = q->depth = 128;
|
||||
+
|
||||
+ } else {
|
||||
+ struct tc_esfq_qopt *ctl = nla_data(opt);
|
||||
+ if (ctl->quantum)
|
||||
+ q->quantum = ctl->quantum;
|
||||
+ q->perturb_period = ctl->perturb_period*HZ;
|
||||
+ q->hash_divisor = ctl->divisor ? : 1024;
|
||||
+ q->tail = q->limit = q->depth = ctl->flows ? : 128;
|
||||
+
|
||||
+ if ( q->depth > p - 1 )
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (ctl->limit)
|
||||
+ q->limit = min_t(u32, ctl->limit, q->depth);
|
||||
+
|
||||
+ if (ctl->hash_kind) {
|
||||
+ q->hash_kind = esfq_check_hash(ctl->hash_kind);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ q->ht = kmalloc(q->hash_divisor*sizeof(esfq_index), GFP_KERNEL);
|
||||
+ if (!q->ht)
|
||||
+ goto err_case;
|
||||
+ q->dep = kmalloc((1+q->depth*2)*sizeof(struct esfq_head), GFP_KERNEL);
|
||||
+ if (!q->dep)
|
||||
+ goto err_case;
|
||||
+ q->next = kmalloc(q->depth*sizeof(esfq_index), GFP_KERNEL);
|
||||
+ if (!q->next)
|
||||
+ goto err_case;
|
||||
+ q->allot = kmalloc(q->depth*sizeof(short), GFP_KERNEL);
|
||||
+ if (!q->allot)
|
||||
+ goto err_case;
|
||||
+ q->hash = kmalloc(q->depth*sizeof(unsigned short), GFP_KERNEL);
|
||||
+ if (!q->hash)
|
||||
+ goto err_case;
|
||||
+ q->qs = kmalloc(q->depth*sizeof(struct sk_buff_head), GFP_KERNEL);
|
||||
+ if (!q->qs)
|
||||
+ goto err_case;
|
||||
+
|
||||
+ for (i=0; i< q->hash_divisor; i++)
|
||||
+ q->ht[i] = q->depth;
|
||||
+ for (i=0; i<q->depth; i++) {
|
||||
+ skb_queue_head_init(&q->qs[i]);
|
||||
+ q->dep[i+q->depth].next = i+q->depth;
|
||||
+ q->dep[i+q->depth].prev = i+q->depth;
|
||||
+ }
|
||||
+
|
||||
+ for (i=0; i<q->depth; i++)
|
||||
+ esfq_link(q, i);
|
||||
+ return 0;
|
||||
+err_case:
|
||||
+ esfq_q_destroy(q);
|
||||
+ return -ENOBUFS;
|
||||
+}
|
||||
+
|
||||
+static int esfq_init(struct Qdisc *sch, struct nlattr *opt)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ int err;
|
||||
+
|
||||
+ q->quantum = psched_mtu(qdisc_dev(sch)); /* default */
|
||||
+ if ((err = esfq_q_init(q, opt)))
|
||||
+ return err;
|
||||
+
|
||||
+ init_timer(&q->perturb_timer);
|
||||
+ q->perturb_timer.data = (unsigned long)sch;
|
||||
+ q->perturb_timer.function = esfq_perturbation;
|
||||
+ if (q->perturb_period) {
|
||||
+ q->perturb_timer.expires = jiffies + q->perturb_period;
|
||||
+ add_timer(&q->perturb_timer);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int esfq_change(struct Qdisc *sch, struct nlattr *opt)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ struct esfq_sched_data new;
|
||||
+ struct sk_buff *skb;
|
||||
+ int err;
|
||||
+
|
||||
+ /* set up new queue */
|
||||
+ memset(&new, 0, sizeof(struct esfq_sched_data));
|
||||
+ new.quantum = psched_mtu(qdisc_dev(sch)); /* default */
|
||||
+ if ((err = esfq_q_init(&new, opt)))
|
||||
+ return err;
|
||||
+
|
||||
+ /* copy all packets from the old queue to the new queue */
|
||||
+ sch_tree_lock(sch);
|
||||
+ while ((skb = esfq_q_dequeue(q)) != NULL)
|
||||
+ esfq_q_enqueue(skb, &new, ESFQ_TAIL);
|
||||
+
|
||||
+ /* clean up the old queue */
|
||||
+ esfq_q_destroy(q);
|
||||
+
|
||||
+ /* copy elements of the new queue into the old queue */
|
||||
+ q->perturb_period = new.perturb_period;
|
||||
+ q->quantum = new.quantum;
|
||||
+ q->limit = new.limit;
|
||||
+ q->depth = new.depth;
|
||||
+ q->hash_divisor = new.hash_divisor;
|
||||
+ q->hash_kind = new.hash_kind;
|
||||
+ q->tail = new.tail;
|
||||
+ q->max_depth = new.max_depth;
|
||||
+ q->ht = new.ht;
|
||||
+ q->dep = new.dep;
|
||||
+ q->next = new.next;
|
||||
+ q->allot = new.allot;
|
||||
+ q->hash = new.hash;
|
||||
+ q->qs = new.qs;
|
||||
+
|
||||
+ /* finish up */
|
||||
+ if (q->perturb_period) {
|
||||
+ q->perturb_timer.expires = jiffies + q->perturb_period;
|
||||
+ add_timer(&q->perturb_timer);
|
||||
+ } else {
|
||||
+ q->perturbation = 0;
|
||||
+ }
|
||||
+ sch_tree_unlock(sch);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
|
||||
+{
|
||||
+ struct esfq_sched_data *q = qdisc_priv(sch);
|
||||
+ unsigned char *b = skb_tail_pointer(skb);
|
||||
+ struct tc_esfq_qopt opt;
|
||||
+
|
||||
+ opt.quantum = q->quantum;
|
||||
+ opt.perturb_period = q->perturb_period/HZ;
|
||||
+
|
||||
+ opt.limit = q->limit;
|
||||
+ opt.divisor = q->hash_divisor;
|
||||
+ opt.flows = q->depth;
|
||||
+ opt.hash_kind = q->hash_kind;
|
||||
+
|
||||
+ NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
|
||||
+
|
||||
+ return skb->len;
|
||||
+
|
||||
+nla_put_failure:
|
||||
+ nlmsg_trim(skb, b);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static struct Qdisc_ops esfq_qdisc_ops =
|
||||
+{
|
||||
+ .next = NULL,
|
||||
+ .cl_ops = NULL,
|
||||
+ .id = "esfq",
|
||||
+ .priv_size = sizeof(struct esfq_sched_data),
|
||||
+ .enqueue = esfq_enqueue,
|
||||
+ .dequeue = esfq_dequeue,
|
||||
+ .peek = esfq_peek,
|
||||
+ .drop = esfq_drop,
|
||||
+ .init = esfq_init,
|
||||
+ .reset = esfq_reset,
|
||||
+ .destroy = esfq_destroy,
|
||||
+ .change = esfq_change,
|
||||
+ .dump = esfq_dump,
|
||||
+ .owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static int __init esfq_module_init(void)
|
||||
+{
|
||||
+ return register_qdisc(&esfq_qdisc_ops);
|
||||
+}
|
||||
+static void __exit esfq_module_exit(void)
|
||||
+{
|
||||
+ unregister_qdisc(&esfq_qdisc_ops);
|
||||
+}
|
||||
+module_init(esfq_module_init)
|
||||
+module_exit(esfq_module_exit)
|
||||
+MODULE_LICENSE("GPL");
|
|
@ -1,227 +0,0 @@
|
|||
--- a/include/linux/jhash.h
|
||||
+++ b/include/linux/jhash.h
|
||||
@@ -3,80 +3,95 @@
|
||||
|
||||
/* jhash.h: Jenkins hash support.
|
||||
*
|
||||
- * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net)
|
||||
+ * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net)
|
||||
*
|
||||
* http://burtleburtle.net/bob/hash/
|
||||
*
|
||||
* These are the credits from Bob's sources:
|
||||
*
|
||||
- * lookup2.c, by Bob Jenkins, December 1996, Public Domain.
|
||||
- * hash(), hash2(), hash3, and mix() are externally useful functions.
|
||||
- * Routines to test the hash are included if SELF_TEST is defined.
|
||||
- * You can use this free for any purpose. It has no warranty.
|
||||
+ * lookup3.c, by Bob Jenkins, May 2006, Public Domain.
|
||||
*
|
||||
- * Copyright (C) 2003 David S. Miller (davem@redhat.com)
|
||||
+ * These are functions for producing 32-bit hashes for hash table lookup.
|
||||
+ * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
|
||||
+ * are externally useful functions. Routines to test the hash are included
|
||||
+ * if SELF_TEST is defined. You can use this free for any purpose. It's in
|
||||
+ * the public domain. It has no warranty.
|
||||
+ *
|
||||
+ * Copyright (C) 2009 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
|
||||
*
|
||||
* I've modified Bob's hash to be useful in the Linux kernel, and
|
||||
- * any bugs present are surely my fault. -DaveM
|
||||
+ * any bugs present are my fault. Jozsef
|
||||
*/
|
||||
|
||||
-/* NOTE: Arguments are modified. */
|
||||
-#define __jhash_mix(a, b, c) \
|
||||
+#define __rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
|
||||
+
|
||||
+/* __jhash_mix - mix 3 32-bit values reversibly. */
|
||||
+#define __jhash_mix(a,b,c) \
|
||||
+{ \
|
||||
+ a -= c; a ^= __rot(c, 4); c += b; \
|
||||
+ b -= a; b ^= __rot(a, 6); a += c; \
|
||||
+ c -= b; c ^= __rot(b, 8); b += a; \
|
||||
+ a -= c; a ^= __rot(c,16); c += b; \
|
||||
+ b -= a; b ^= __rot(a,19); a += c; \
|
||||
+ c -= b; c ^= __rot(b, 4); b += a; \
|
||||
+}
|
||||
+
|
||||
+/* __jhash_final - final mixing of 3 32-bit values (a,b,c) into c */
|
||||
+#define __jhash_final(a,b,c) \
|
||||
{ \
|
||||
- a -= b; a -= c; a ^= (c>>13); \
|
||||
- b -= c; b -= a; b ^= (a<<8); \
|
||||
- c -= a; c -= b; c ^= (b>>13); \
|
||||
- a -= b; a -= c; a ^= (c>>12); \
|
||||
- b -= c; b -= a; b ^= (a<<16); \
|
||||
- c -= a; c -= b; c ^= (b>>5); \
|
||||
- a -= b; a -= c; a ^= (c>>3); \
|
||||
- b -= c; b -= a; b ^= (a<<10); \
|
||||
- c -= a; c -= b; c ^= (b>>15); \
|
||||
+ c ^= b; c -= __rot(b,14); \
|
||||
+ a ^= c; a -= __rot(c,11); \
|
||||
+ b ^= a; b -= __rot(a,25); \
|
||||
+ c ^= b; c -= __rot(b,16); \
|
||||
+ a ^= c; a -= __rot(c,4); \
|
||||
+ b ^= a; b -= __rot(a,14); \
|
||||
+ c ^= b; c -= __rot(b,24); \
|
||||
}
|
||||
|
||||
-/* The golden ration: an arbitrary value */
|
||||
-#define JHASH_GOLDEN_RATIO 0x9e3779b9
|
||||
+/* An arbitrary initial parameter */
|
||||
+#define JHASH_GOLDEN_RATIO 0xdeadbeef
|
||||
|
||||
/* The most generic version, hashes an arbitrary sequence
|
||||
* of bytes. No alignment or length assumptions are made about
|
||||
- * the input key.
|
||||
+ * the input key. The result depends on endianness.
|
||||
*/
|
||||
static inline u32 jhash(const void *key, u32 length, u32 initval)
|
||||
{
|
||||
- u32 a, b, c, len;
|
||||
+ u32 a,b,c;
|
||||
const u8 *k = key;
|
||||
|
||||
- len = length;
|
||||
- a = b = JHASH_GOLDEN_RATIO;
|
||||
- c = initval;
|
||||
-
|
||||
- while (len >= 12) {
|
||||
- a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24));
|
||||
- b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24));
|
||||
- c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24));
|
||||
-
|
||||
- __jhash_mix(a,b,c);
|
||||
+ /* Set up the internal state */
|
||||
+ a = b = c = JHASH_GOLDEN_RATIO + length + initval;
|
||||
|
||||
+ /* all but the last block: affect some 32 bits of (a,b,c) */
|
||||
+ while (length > 12) {
|
||||
+ a += (k[0] + ((u32)k[1]<<8) + ((u32)k[2]<<16) + ((u32)k[3]<<24));
|
||||
+ b += (k[4] + ((u32)k[5]<<8) + ((u32)k[6]<<16) + ((u32)k[7]<<24));
|
||||
+ c += (k[8] + ((u32)k[9]<<8) + ((u32)k[10]<<16) + ((u32)k[11]<<24));
|
||||
+ __jhash_mix(a, b, c);
|
||||
+ length -= 12;
|
||||
k += 12;
|
||||
- len -= 12;
|
||||
}
|
||||
|
||||
- c += length;
|
||||
- switch (len) {
|
||||
- case 11: c += ((u32)k[10]<<24);
|
||||
- case 10: c += ((u32)k[9]<<16);
|
||||
- case 9 : c += ((u32)k[8]<<8);
|
||||
- case 8 : b += ((u32)k[7]<<24);
|
||||
- case 7 : b += ((u32)k[6]<<16);
|
||||
- case 6 : b += ((u32)k[5]<<8);
|
||||
+ /* last block: affect all 32 bits of (c) */
|
||||
+ /* all the case statements fall through */
|
||||
+ switch (length) {
|
||||
+ case 12: c += (u32)k[11]<<24;
|
||||
+ case 11: c += (u32)k[10]<<16;
|
||||
+ case 10: c += (u32)k[9]<<8;
|
||||
+ case 9 : c += k[8];
|
||||
+ case 8 : b += (u32)k[7]<<24;
|
||||
+ case 7 : b += (u32)k[6]<<16;
|
||||
+ case 6 : b += (u32)k[5]<<8;
|
||||
case 5 : b += k[4];
|
||||
- case 4 : a += ((u32)k[3]<<24);
|
||||
- case 3 : a += ((u32)k[2]<<16);
|
||||
- case 2 : a += ((u32)k[1]<<8);
|
||||
+ case 4 : a += (u32)k[3]<<24;
|
||||
+ case 3 : a += (u32)k[2]<<16;
|
||||
+ case 2 : a += (u32)k[1]<<8;
|
||||
case 1 : a += k[0];
|
||||
- };
|
||||
-
|
||||
- __jhash_mix(a,b,c);
|
||||
+ __jhash_final(a, b, c);
|
||||
+ case 0 :
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -86,58 +101,57 @@ static inline u32 jhash(const void *key,
|
||||
*/
|
||||
static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
|
||||
{
|
||||
- u32 a, b, c, len;
|
||||
+ u32 a, b, c;
|
||||
|
||||
- a = b = JHASH_GOLDEN_RATIO;
|
||||
- c = initval;
|
||||
- len = length;
|
||||
+ /* Set up the internal state */
|
||||
+ a = b = c = JHASH_GOLDEN_RATIO + (length<<2) + initval;
|
||||
|
||||
- while (len >= 3) {
|
||||
+ /* handle most of the key */
|
||||
+ while (length > 3) {
|
||||
a += k[0];
|
||||
b += k[1];
|
||||
c += k[2];
|
||||
__jhash_mix(a, b, c);
|
||||
- k += 3; len -= 3;
|
||||
+ length -= 3;
|
||||
+ k += 3;
|
||||
}
|
||||
|
||||
- c += length * 4;
|
||||
-
|
||||
- switch (len) {
|
||||
- case 2 : b += k[1];
|
||||
- case 1 : a += k[0];
|
||||
- };
|
||||
-
|
||||
- __jhash_mix(a,b,c);
|
||||
+ /* handle the last 3 u32's */
|
||||
+ /* all the case statements fall through */
|
||||
+ switch (length) {
|
||||
+ case 3: c += k[2];
|
||||
+ case 2: b += k[1];
|
||||
+ case 1: a += k[0];
|
||||
+ __jhash_final(a, b, c);
|
||||
+ case 0: /* case 0: nothing left to add */
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
-
|
||||
/* A special ultra-optimized versions that knows they are hashing exactly
|
||||
* 3, 2 or 1 word(s).
|
||||
- *
|
||||
- * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
|
||||
- * done at the end is not done here.
|
||||
*/
|
||||
static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval)
|
||||
{
|
||||
- a += JHASH_GOLDEN_RATIO;
|
||||
- b += JHASH_GOLDEN_RATIO;
|
||||
- c += initval;
|
||||
+ a += JHASH_GOLDEN_RATIO + initval;
|
||||
+ b += JHASH_GOLDEN_RATIO + initval;
|
||||
+ c += JHASH_GOLDEN_RATIO + initval;
|
||||
|
||||
- __jhash_mix(a, b, c);
|
||||
+ __jhash_final(a, b, c);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline u32 jhash_2words(u32 a, u32 b, u32 initval)
|
||||
{
|
||||
- return jhash_3words(a, b, 0, initval);
|
||||
+ return jhash_3words(0, a, b, initval);
|
||||
}
|
||||
|
||||
static inline u32 jhash_1word(u32 a, u32 initval)
|
||||
{
|
||||
- return jhash_3words(a, 0, 0, initval);
|
||||
+ return jhash_3words(0, 0, a, initval);
|
||||
}
|
||||
|
||||
#endif /* _LINUX_JHASH_H */
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue