diff options
Diffstat (limited to 'target/linux/xburst')
-rw-r--r-- | target/linux/xburst/Makefile | 4 | ||||
-rw-r--r-- | target/linux/xburst/config-3.8 (renamed from target/linux/xburst/config-3.3) | 73 | ||||
-rw-r--r-- | target/linux/xburst/id800wt/config-3.8 (renamed from target/linux/xburst/id800wt/config-3.3) | 6 | ||||
-rw-r--r-- | target/linux/xburst/n516/config-3.8 (renamed from target/linux/xburst/n516/config-3.3) | 1 | ||||
-rw-r--r-- | target/linux/xburst/n526/config-3.8 (renamed from target/linux/xburst/n526/config-3.3) | 0 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0006-MTD-NAND-JZ4740-Multi-bank-support-with-autodetectio.patch | 417 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0014-MIPS-JZ4740-reset-Initialize-hibernate-wakeup-counte.patch | 91 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0015-ASoC-JZ4740-Replaced-comma-operators-with-semicolons.patch | 31 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0017-MIPS-JZ4740-qi_lb60-Look-for-NAND-chip-in-bank-1.patch | 21 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch | 121 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.3/0019-Framebuffer-notifier-Call-notifier-callbacks-prior-t.patch | 38 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch (renamed from target/linux/xburst/patches-3.3/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch) | 2 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0002-Add-jz4740-udc-driver.patch (renamed from target/linux/xburst/patches-3.3/0002-Add-jz4740-udc-driver.patch) | 35 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch (renamed from target/linux/xburst/patches-3.3/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch) | 13 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch (renamed from target/linux/xburst/patches-3.3/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch) | 35 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch (renamed from target/linux/xburst/patches-3.3/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch) | 8 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0007-Add-ili8960-lcd-driver.patch (renamed from target/linux/xburst/patches-3.3/0007-Add-ili8960-lcd-driver.patch) | 10 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch (renamed from target/linux/xburst/patches-3.3/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch) | 2 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch (renamed from target/linux/xburst/patches-3.3/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch) | 16 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch (renamed from target/linux/xburst/patches-3.3/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch) | 21 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch (renamed from target/linux/xburst/patches-3.3/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch) | 0 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0012-MIPS-JZ4740-Add-cpufreq-support.patch (renamed from target/linux/xburst/patches-3.3/0012-MIPS-JZ4740-Add-cpufreq-support.patch) | 6 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch (renamed from target/linux/xburst/patches-3.3/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch) | 6 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch (renamed from target/linux/xburst/patches-3.3/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch) | 0 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0020-qi_lb60-NAND-add-data-partition.patch (renamed from target/linux/xburst/patches-3.3/0020-qi_lb60-NAND-add-data-partition.patch) | 0 | ||||
-rw-r--r-- | target/linux/xburst/patches-3.8/0021-rtc-jz4740-fix-hwclock-give-time-out.patch (renamed from target/linux/xburst/patches-3.3/0021-rtc-jz4740-fix-hwclock-give-time-out.patch) | 2 | ||||
-rw-r--r-- | target/linux/xburst/qi_lb60/config-3.8 (renamed from target/linux/xburst/qi_lb60/config-3.3) | 2 |
27 files changed, 103 insertions, 858 deletions
diff --git a/target/linux/xburst/Makefile b/target/linux/xburst/Makefile index 9b4ac8845..6525c8367 100644 --- a/target/linux/xburst/Makefile +++ b/target/linux/xburst/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk ARCH:=mipsel BOARD:=xburst BOARDNAME:=Ingenic XBurst -FEATURES:=jffs2 targz ubifs audio +FEATURES:=jffs2 targz ubifs audio broken SUBTARGETS:=qi_lb60 n516 n526 id800wt -LINUX_VERSION:=3.3.8 +LINUX_VERSION:=3.8.12 DEVICE_TYPE=other diff --git a/target/linux/xburst/config-3.3 b/target/linux/xburst/config-3.8 index bf250c2ed..a7d02cc68 100644 --- a/target/linux/xburst/config-3.3 +++ b/target/linux/xburst/config-3.8 @@ -1,35 +1,40 @@ CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y # CONFIG_ARPD is not set CONFIG_BATTERY_JZ4740=y -CONFIG_BCMA_POSSIBLE=y # CONFIG_BLK_DEV_INITRD is not set # CONFIG_BRIDGE is not set CONFIG_CHARGER_GPIO=y CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_CPU_GENERIC_DUMP_TLB=y CONFIG_CPU_HAS_PREFETCH=y CONFIG_CPU_HAS_SYNC=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_CPU_MIPS32=y CONFIG_CPU_MIPS32_R1=y CONFIG_CPU_MIPSR1=y +CONFIG_CPU_R4K_CACHE_TLB=y +CONFIG_CPU_R4K_FPU=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_CPUFREQ=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CRC16=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_XZ=y CONFIG_DEVMEM=y CONFIG_DMA_NONCOHERENT=y CONFIG_DUMMY_CONSOLE=y CONFIG_EARLY_PRINTK=y -CONFIG_ELF_CORE=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_EXT4_FS=y CONFIG_FAT_FS=y @@ -38,9 +43,7 @@ CONFIG_FB_JZ4740=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_IMAGEBLIT=y -# CONFIG_FB_TMIO is not set # CONFIG_FB_WMT_GE_ROPS is not set -# CONFIG_FIRMWARE_EDID is not set CONFIG_FONTS=y # CONFIG_FONT_10x18 is not set CONFIG_FONT_6x11=y @@ -63,8 +66,10 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GPIOLIB=y # CONFIG_HAMRADIO is not set CONFIG_HARDWARE_WATCHPOINTS=y @@ -73,8 +78,10 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_CLK=y CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DYNAMIC_FTRACE=y @@ -86,21 +93,20 @@ CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_GENERIC_HARDIRQS=y CONFIG_HAVE_IDE=y CONFIG_HAVE_IRQ_WORK=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y -CONFIG_HAVE_PWM=y # CONFIG_HIGH_RES_TIMERS is not set CONFIG_HW_CONSOLE=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y -# CONFIG_INLINE_READ_UNLOCK is not set -# CONFIG_INLINE_READ_UNLOCK_IRQ is not set -# CONFIG_INLINE_SPIN_UNLOCK is not set -# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set -# CONFIG_INLINE_WRITE_UNLOCK is not set -# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_KEYBOARD=y @@ -109,13 +115,15 @@ CONFIG_INPUT_MOUSEDEV=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_PWM_BEEPER is not set CONFIG_INPUT_UINPUT=y CONFIG_IRQ_CPU=y +CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_JBD2=y CONFIG_JZ4740_QI_LB60=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_UNCOMPRESSED is not set +CONFIG_KERNEL_GZIP=y CONFIG_KEXEC=y # CONFIG_KEYBOARD_GPIO is not set CONFIG_LEGACY_PTYS=y @@ -128,6 +136,7 @@ CONFIG_MFD_JZ4740_ADC=y CONFIG_MIPS=y CONFIG_MIPS_CPUFREQ=y CONFIG_MIPS_FPU_EMU=y +# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set CONFIG_MIPS_MT_DISABLED=y @@ -136,6 +145,7 @@ CONFIG_MMC_BLOCK=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_MMC_JZ4740=y CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MOUSE_BCM5974 is not set CONFIG_MOUSE_PS2=y # CONFIG_MOUSE_PS2_ALPS is not set @@ -153,8 +163,8 @@ CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_JZ4740=y # CONFIG_MTD_SM_COMMON is not set CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_RESERVE=1 -# CONFIG_MTD_UBI_DEBUG is not set +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_FASTMAP is not set # CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NEED_DMA_MAP_STATE=y @@ -203,6 +213,7 @@ CONFIG_NLS_KOI8_U=y CONFIG_NLS_UTF8=y CONFIG_PAGEFLAGS_EXTENDED=y # CONFIG_PDA_POWER is not set +CONFIG_PERCPU_RWSEM=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PM=y CONFIG_PM_CLK=y @@ -218,14 +229,15 @@ CONFIG_PROC_PAGE_MONITOR=y # CONFIG_RCU_BOOST is not set CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y CONFIG_RTC_CLASS=y # CONFIG_RTC_DRV_CMOS is not set CONFIG_RTC_DRV_JZ4740=y # CONFIG_SCSI_DMA is not set -# CONFIG_SENSORS_JZ4740 is not set CONFIG_SERIO=y CONFIG_SERIO_LIBPS2=y CONFIG_SND=y +CONFIG_SND_COMPRESS_OFFLOAD=y # CONFIG_SND_EMU10K1_SEQ is not set CONFIG_SND_JACK=y CONFIG_SND_JZ4740_SOC=y @@ -253,43 +265,29 @@ CONFIG_SYS_HAS_EARLY_PRINTK=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_SYS_SUPPORTS_ARBIT_HZ=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_ZBOOT=y +CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y +CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_PREEMPT_RCU=y CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_ADVANCED_COMPR=y -# CONFIG_UBIFS_FS_DEBUG is not set CONFIG_UBIFS_FS_LZO=y -# CONFIG_UBIFS_FS_XATTR is not set CONFIG_UBIFS_FS_XZ=y CONFIG_UBIFS_FS_ZLIB=y +CONFIG_UIDGID_CONVERTED=y +CONFIG_UNINLINE_SPIN_UNLOCK=y # CONFIG_USB_ARCH_HAS_EHCI is not set # CONFIG_USB_ARCH_HAS_XHCI is not set # CONFIG_USB_AUDIO is not set -# CONFIG_USB_CDC_COMPOSITE is not set CONFIG_USB_COMMON=y CONFIG_USB_ETH=y # CONFIG_USB_ETH_EEM is not set # CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_FUNCTIONFS is not set CONFIG_USB_FUSB300=y CONFIG_USB_GADGET=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_DUALSPEED=y -CONFIG_USB_GADGET_VBUS_DRAW=2 -# CONFIG_USB_G_DBGP is not set -# CONFIG_USB_G_HID is not set -# CONFIG_USB_G_NCM is not set -# CONFIG_USB_G_PRINTER is not set -# CONFIG_USB_G_SERIAL is not set # CONFIG_USB_JZ4740 is not set -# CONFIG_USB_M66592 is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_R8A66597 is not set +CONFIG_USB_LIBCOMPOSITE=y CONFIG_USB_SUPPORT=y -# CONFIG_USB_ZERO is not set CONFIG_VFAT_FS=y # CONFIG_VGA_CONSOLE is not set # CONFIG_VLAN_8021Q is not set @@ -298,5 +296,4 @@ CONFIG_VT_CONSOLE=y CONFIG_VT_CONSOLE_SLEEP=y CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_WATCHDOG is not set -CONFIG_XZ_DEC=y CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/xburst/id800wt/config-3.3 b/target/linux/xburst/id800wt/config-3.8 index eb63a809a..4e2031320 100644 --- a/target/linux/xburst/id800wt/config-3.3 +++ b/target/linux/xburst/id800wt/config-3.8 @@ -3,10 +3,9 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_GENERIC=y CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_PWM=y CONFIG_BLK_DEV_SD=y CONFIG_GPIO_SYSFS=y -CONFIG_INPUT_PWM_BEEPER=y +CONFIG_INPUT_MATRIXKMAP=y CONFIG_INPUT_TOUCHSCREEN=y CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_MATRIX=y @@ -36,7 +35,6 @@ CONFIG_SPI_MASTER=y # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set # CONFIG_TOUCHSCREEN_BU21013 is not set # CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_EGALAX is not set # CONFIG_TOUCHSCREEN_HAMPSHIRE is not set # CONFIG_TOUCHSCREEN_MAX11801 is not set # CONFIG_TOUCHSCREEN_PIXCIR is not set @@ -44,8 +42,8 @@ CONFIG_SPI_MASTER=y # CONFIG_TOUCHSCREEN_TSC2005 is not set # CONFIG_TOUCHSCREEN_TSC_SERIO is not set CONFIG_USB=y -# CONFIG_USB_DUMMY_HCD is not set # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_HCD_PLATFORM is not set CONFIG_USB_STORAGE=y diff --git a/target/linux/xburst/n516/config-3.3 b/target/linux/xburst/n516/config-3.8 index bc781d6fd..f15e78ae5 100644 --- a/target/linux/xburst/n516/config-3.3 +++ b/target/linux/xburst/n516/config-3.8 @@ -4,7 +4,6 @@ CONFIG_FB_SYS_FOPS=m CONFIG_HWMON=y CONFIG_I2C_ALGOBIT=y CONFIG_LEDS_GPIO=y -# CONFIG_LEDS_PWM is not set CONFIG_MTD_CMDLINE_PARTS=y CONFIG_NEW_LEDS=y # CONFIG_SENSORS_JZ4740 is not set diff --git a/target/linux/xburst/n526/config-3.3 b/target/linux/xburst/n526/config-3.8 index b89d18d43..b89d18d43 100644 --- a/target/linux/xburst/n526/config-3.3 +++ b/target/linux/xburst/n526/config-3.8 diff --git a/target/linux/xburst/patches-3.3/0006-MTD-NAND-JZ4740-Multi-bank-support-with-autodetectio.patch b/target/linux/xburst/patches-3.3/0006-MTD-NAND-JZ4740-Multi-bank-support-with-autodetectio.patch deleted file mode 100644 index 411014797..000000000 --- a/target/linux/xburst/patches-3.3/0006-MTD-NAND-JZ4740-Multi-bank-support-with-autodetectio.patch +++ /dev/null @@ -1,417 +0,0 @@ -From d5814bdb661d3dac61422f8f69e459be884c9a9d Mon Sep 17 00:00:00 2001 -From: Maarten ter Huurne <maarten@treewalker.org> -Date: Tue, 2 Aug 2011 10:49:28 +0200 -Subject: [PATCH 06/21] MTD: NAND: JZ4740: Multi-bank support with - autodetection - -The platform data can now specify which external memory banks to probe -for NAND chips, and in which order. Banks that contain a NAND are used -and the other banks are freed. - -Squashed version of development done in jz-2.6.38 branch. -Original patch by Lars-Peter Clausen with some bug fixes from me. -Thanks to Paul Cercueil for the initial autodetection patch. ---- - arch/mips/include/asm/mach-jz4740/jz4740_nand.h | 4 + - arch/mips/jz4740/platform.c | 20 ++- - drivers/mtd/nand/jz4740_nand.c | 228 +++++++++++++++++++---- - 3 files changed, 215 insertions(+), 37 deletions(-) - ---- a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h -+++ b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h -@@ -19,6 +19,8 @@ - #include <linux/mtd/nand.h> - #include <linux/mtd/partitions.h> - -+#define JZ_NAND_NUM_BANKS 4 -+ - struct jz_nand_platform_data { - int num_partitions; - struct mtd_partition *partitions; -@@ -27,6 +29,8 @@ struct jz_nand_platform_data { - - unsigned int busy_gpio; - -+ unsigned char banks[JZ_NAND_NUM_BANKS]; -+ - void (*ident_callback)(struct platform_device *, struct nand_chip *, - struct mtd_partition **, int *num_partitions); - }; ---- a/arch/mips/jz4740/platform.c -+++ b/arch/mips/jz4740/platform.c -@@ -157,11 +157,29 @@ static struct resource jz4740_nand_resou - .flags = IORESOURCE_MEM, - }, - { -- .name = "bank", -+ .name = "bank1", - .start = 0x18000000, - .end = 0x180C0000 - 1, - .flags = IORESOURCE_MEM, - }, -+ { -+ .name = "bank2", -+ .start = 0x14000000, -+ .end = 0x140C0000 - 1, -+ .flags = IORESOURCE_MEM, -+ }, -+ { -+ .name = "bank3", -+ .start = 0x0C000000, -+ .end = 0x0C0C0000 - 1, -+ .flags = IORESOURCE_MEM, -+ }, -+ { -+ .name = "bank4", -+ .start = 0x08000000, -+ .end = 0x080C0000 - 1, -+ .flags = IORESOURCE_MEM, -+ }, - }; - - struct platform_device jz4740_nand_device = { ---- a/drivers/mtd/nand/jz4740_nand.c -+++ b/drivers/mtd/nand/jz4740_nand.c -@@ -52,9 +52,10 @@ - - #define JZ_NAND_CTRL_ENABLE_CHIP(x) BIT((x) << 1) - #define JZ_NAND_CTRL_ASSERT_CHIP(x) BIT(((x) << 1) + 1) -+#define JZ_NAND_CTRL_ASSERT_CHIP_MASK 0xaa - --#define JZ_NAND_MEM_ADDR_OFFSET 0x10000 - #define JZ_NAND_MEM_CMD_OFFSET 0x08000 -+#define JZ_NAND_MEM_ADDR_OFFSET 0x10000 - - struct jz_nand { - struct mtd_info mtd; -@@ -62,8 +63,11 @@ struct jz_nand { - void __iomem *base; - struct resource *mem; - -- void __iomem *bank_base; -- struct resource *bank_mem; -+ unsigned char banks[JZ_NAND_NUM_BANKS]; -+ void __iomem *bank_base[JZ_NAND_NUM_BANKS]; -+ struct resource *bank_mem[JZ_NAND_NUM_BANKS]; -+ -+ int selected_bank; - - struct jz_nand_platform_data *pdata; - bool is_reading; -@@ -74,26 +78,50 @@ static inline struct jz_nand *mtd_to_jz_ - return container_of(mtd, struct jz_nand, mtd); - } - -+static void jz_nand_select_chip(struct mtd_info *mtd, int chipnr) -+{ -+ struct jz_nand *nand = mtd_to_jz_nand(mtd); -+ struct nand_chip *chip = mtd->priv; -+ uint32_t ctrl; -+ int banknr; -+ -+ ctrl = readl(nand->base + JZ_REG_NAND_CTRL); -+ ctrl &= ~JZ_NAND_CTRL_ASSERT_CHIP_MASK; -+ -+ if (chipnr == -1) { -+ banknr = -1; -+ } else { -+ banknr = nand->banks[chipnr] - 1; -+ chip->IO_ADDR_R = nand->bank_base[banknr]; -+ chip->IO_ADDR_W = nand->bank_base[banknr]; -+ } -+ writel(ctrl, nand->base + JZ_REG_NAND_CTRL); -+ -+ nand->selected_bank = banknr; -+} -+ - static void jz_nand_cmd_ctrl(struct mtd_info *mtd, int dat, unsigned int ctrl) - { - struct jz_nand *nand = mtd_to_jz_nand(mtd); - struct nand_chip *chip = mtd->priv; - uint32_t reg; -+ void __iomem *bank_base = nand->bank_base[nand->selected_bank]; -+ -+ BUG_ON(nand->selected_bank < 0); - - if (ctrl & NAND_CTRL_CHANGE) { - BUG_ON((ctrl & NAND_ALE) && (ctrl & NAND_CLE)); - if (ctrl & NAND_ALE) -- chip->IO_ADDR_W = nand->bank_base + JZ_NAND_MEM_ADDR_OFFSET; -+ bank_base += JZ_NAND_MEM_ADDR_OFFSET; - else if (ctrl & NAND_CLE) -- chip->IO_ADDR_W = nand->bank_base + JZ_NAND_MEM_CMD_OFFSET; -- else -- chip->IO_ADDR_W = nand->bank_base; -+ bank_base += JZ_NAND_MEM_CMD_OFFSET; -+ chip->IO_ADDR_W = bank_base; - - reg = readl(nand->base + JZ_REG_NAND_CTRL); - if (ctrl & NAND_NCE) -- reg |= JZ_NAND_CTRL_ASSERT_CHIP(0); -+ reg |= JZ_NAND_CTRL_ASSERT_CHIP(nand->selected_bank); - else -- reg &= ~JZ_NAND_CTRL_ASSERT_CHIP(0); -+ reg &= ~JZ_NAND_CTRL_ASSERT_CHIP(nand->selected_bank); - writel(reg, nand->base + JZ_REG_NAND_CTRL); - } - if (dat != NAND_CMD_NONE) -@@ -252,7 +280,7 @@ static int jz_nand_correct_ecc_rs(struct - } - - static int jz_nand_ioremap_resource(struct platform_device *pdev, -- const char *name, struct resource **res, void __iomem **base) -+ const char *name, struct resource **res, void *__iomem *base) - { - int ret; - -@@ -288,6 +316,90 @@ err: - return ret; - } - -+static inline void jz_nand_iounmap_resource(struct resource *res, void __iomem *base) -+{ -+ iounmap(base); -+ release_mem_region(res->start, resource_size(res)); -+} -+ -+static int __devinit jz_nand_detect_bank(struct platform_device *pdev, struct jz_nand *nand, unsigned char bank, size_t chipnr, uint8_t *nand_maf_id, uint8_t *nand_dev_id) { -+ int ret; -+ int gpio; -+ char gpio_name[9]; -+ char res_name[6]; -+ uint32_t ctrl; -+ struct mtd_info *mtd = &nand->mtd; -+ struct nand_chip *chip = &nand->chip; -+ -+ /* Request GPIO port. */ -+ gpio = JZ_GPIO_MEM_CS0 + bank - 1; -+ sprintf(gpio_name, "NAND CS%d", bank); -+ ret = gpio_request(gpio, gpio_name); -+ if (ret) { -+ dev_warn(&pdev->dev, -+ "Failed to request %s gpio %d: %d\n", -+ gpio_name, gpio, ret); -+ goto notfound_gpio; -+ } -+ -+ /* Request I/O resource. */ -+ sprintf(res_name, "bank%d", bank); -+ ret = jz_nand_ioremap_resource(pdev, res_name, -+ &nand->bank_mem[bank - 1], -+ &nand->bank_base[bank - 1]); -+ if (ret) -+ goto notfound_resource; -+ -+ /* Enable chip in bank. */ -+ jz_gpio_set_function(gpio, JZ_GPIO_FUNC_MEM_CS0); -+ ctrl = readl(nand->base + JZ_REG_NAND_CTRL); -+ ctrl |= JZ_NAND_CTRL_ENABLE_CHIP(bank - 1); -+ writel(ctrl, nand->base + JZ_REG_NAND_CTRL); -+ -+ if (chipnr == 0) { -+ /* Detect first chip. */ -+ ret = nand_scan_ident(mtd, 1, NULL); -+ if (ret) -+ goto notfound_id; -+ -+ /* Retrieve the IDs from the first chip. */ -+ chip->select_chip(mtd, 0); -+ chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); -+ chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); -+ *nand_maf_id = chip->read_byte(mtd); -+ *nand_dev_id = chip->read_byte(mtd); -+ } else { -+ /* Detect additional chip. */ -+ chip->select_chip(mtd, chipnr); -+ chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); -+ chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); -+ if (*nand_maf_id != chip->read_byte(mtd) -+ || *nand_dev_id != chip->read_byte(mtd)) { -+ ret = -ENODEV; -+ goto notfound_id; -+ } -+ -+ /* Update size of the MTD. */ -+ chip->numchips++; -+ mtd->size += chip->chipsize; -+ } -+ -+ dev_info(&pdev->dev, "Found chip %i on bank %i\n", chipnr, bank); -+ return 0; -+ -+notfound_id: -+ dev_info(&pdev->dev, "No chip found on bank %i\n", bank); -+ ctrl &= ~(JZ_NAND_CTRL_ENABLE_CHIP(bank - 1)); -+ writel(ctrl, nand->base + JZ_REG_NAND_CTRL); -+ jz_gpio_set_function(gpio, JZ_GPIO_FUNC_NONE); -+ jz_nand_iounmap_resource(nand->bank_mem[bank - 1], -+ nand->bank_base[bank - 1]); -+notfound_resource: -+ gpio_free(gpio); -+notfound_gpio: -+ return ret; -+} -+ - static int __devinit jz_nand_probe(struct platform_device *pdev) - { - int ret; -@@ -295,6 +407,8 @@ static int __devinit jz_nand_probe(struc - struct nand_chip *chip; - struct mtd_info *mtd; - struct jz_nand_platform_data *pdata = pdev->dev.platform_data; -+ size_t chipnr, bank_idx; -+ uint8_t nand_maf_id = 0, nand_dev_id = 0; - - nand = kzalloc(sizeof(*nand), GFP_KERNEL); - if (!nand) { -@@ -305,10 +419,6 @@ static int __devinit jz_nand_probe(struc - ret = jz_nand_ioremap_resource(pdev, "mmio", &nand->mem, &nand->base); - if (ret) - goto err_free; -- ret = jz_nand_ioremap_resource(pdev, "bank", &nand->bank_mem, -- &nand->bank_base); -- if (ret) -- goto err_iounmap_mmio; - - if (pdata && gpio_is_valid(pdata->busy_gpio)) { - ret = gpio_request(pdata->busy_gpio, "NAND busy pin"); -@@ -316,7 +426,7 @@ static int __devinit jz_nand_probe(struc - dev_err(&pdev->dev, - "Failed to request busy gpio %d: %d\n", - pdata->busy_gpio, ret); -- goto err_iounmap_mem; -+ goto err_iounmap_mmio; - } - } - -@@ -338,22 +448,51 @@ static int __devinit jz_nand_probe(struc - - chip->chip_delay = 50; - chip->cmd_ctrl = jz_nand_cmd_ctrl; -+ chip->select_chip = jz_nand_select_chip; - - if (pdata && gpio_is_valid(pdata->busy_gpio)) - chip->dev_ready = jz_nand_dev_ready; - -- chip->IO_ADDR_R = nand->bank_base; -- chip->IO_ADDR_W = nand->bank_base; -- - nand->pdata = pdata; - platform_set_drvdata(pdev, nand); - -- writel(JZ_NAND_CTRL_ENABLE_CHIP(0), nand->base + JZ_REG_NAND_CTRL); -- -- ret = nand_scan_ident(mtd, 1, NULL); -- if (ret) { -- dev_err(&pdev->dev, "Failed to scan nand\n"); -- goto err_gpio_free; -+ /* We are going to autodetect NAND chips in the banks specified in the -+ * platform data. Although nand_scan_ident() can detect multiple chips, -+ * it requires those chips to be numbered consecuitively, which is not -+ * always the case for external memory banks. And a fixed chip-to-bank -+ * mapping is not practical either, since for example Dingoo units -+ * produced at different times have NAND chips in different banks. -+ */ -+ chipnr = 0; -+ for (bank_idx = 0; bank_idx < JZ_NAND_NUM_BANKS; bank_idx++) { -+ unsigned char bank; -+ -+ /* If there is no platform data, look for NAND in bank 1, -+ * which is the most likely bank since it is the only one -+ * that can be booted from. -+ */ -+ bank = pdata ? pdata->banks[bank_idx] : bank_idx ^ 1; -+ if (bank == 0) -+ break; -+ if (bank > JZ_NAND_NUM_BANKS) { -+ dev_warn(&pdev->dev, -+ "Skipping non-existing bank: %d\n", bank); -+ continue; -+ } -+ /* The detection routine will directly or indirectly call -+ * jz_nand_select_chip(), so nand->banks has to contain the -+ * bank we're checking. -+ */ -+ nand->banks[chipnr] = bank; -+ if (jz_nand_detect_bank(pdev, nand, bank, chipnr, -+ &nand_maf_id, &nand_dev_id) == 0) -+ chipnr++; -+ else -+ nand->banks[chipnr] = 0; -+ } -+ if (chipnr == 0) { -+ dev_err(&pdev->dev, "No NAND chips found\n"); -+ goto err_gpio_busy; - } - - if (pdata && pdata->ident_callback) { -@@ -363,8 +502,8 @@ static int __devinit jz_nand_probe(struc - - ret = nand_scan_tail(mtd); - if (ret) { -- dev_err(&pdev->dev, "Failed to scan nand\n"); -- goto err_gpio_free; -+ dev_err(&pdev->dev, "Failed to scan NAND\n"); -+ goto err_unclaim_banks; - } - - ret = mtd_device_parse_register(mtd, NULL, 0, -@@ -381,14 +520,21 @@ static int __devinit jz_nand_probe(struc - return 0; - - err_nand_release: -- nand_release(&nand->mtd); --err_gpio_free: -+ nand_release(mtd); -+err_unclaim_banks: -+ while (chipnr--) { -+ unsigned char bank = nand->banks[chipnr]; -+ gpio_free(JZ_GPIO_MEM_CS0 + bank - 1); -+ jz_nand_iounmap_resource(nand->bank_mem[bank - 1], -+ nand->bank_base[bank - 1]); -+ } -+ writel(0, nand->base + JZ_REG_NAND_CTRL); -+err_gpio_busy: -+ if (pdata && gpio_is_valid(pdata->busy_gpio)) -+ gpio_free(pdata->busy_gpio); - platform_set_drvdata(pdev, NULL); -- gpio_free(pdata->busy_gpio); --err_iounmap_mem: -- iounmap(nand->bank_base); - err_iounmap_mmio: -- iounmap(nand->base); -+ jz_nand_iounmap_resource(nand->mem, nand->base); - err_free: - kfree(nand); - return ret; -@@ -397,16 +543,26 @@ err_free: - static int __devexit jz_nand_remove(struct platform_device *pdev) - { - struct jz_nand *nand = platform_get_drvdata(pdev); -+ struct jz_nand_platform_data *pdata = pdev->dev.platform_data; -+ size_t i; - - nand_release(&nand->mtd); - - /* Deassert and disable all chips */ - writel(0, nand->base + JZ_REG_NAND_CTRL); - -- iounmap(nand->bank_base); -- release_mem_region(nand->bank_mem->start, resource_size(nand->bank_mem)); -- iounmap(nand->base); -- release_mem_region(nand->mem->start, resource_size(nand->mem)); -+ for (i = 0; i < JZ_NAND_NUM_BANKS; ++i) { -+ unsigned char bank = nand->banks[i]; -+ if (bank != 0) { -+ jz_nand_iounmap_resource(nand->bank_mem[bank - 1], -+ nand->bank_base[bank - 1]); -+ gpio_free(JZ_GPIO_MEM_CS0 + bank - 1); -+ } -+ } -+ if (pdata && gpio_is_valid(pdata->busy_gpio)) -+ gpio_free(pdata->busy_gpio); -+ -+ jz_nand_iounmap_resource(nand->mem, nand->base); - - platform_set_drvdata(pdev, NULL); - kfree(nand); diff --git a/target/linux/xburst/patches-3.3/0014-MIPS-JZ4740-reset-Initialize-hibernate-wakeup-counte.patch b/target/linux/xburst/patches-3.3/0014-MIPS-JZ4740-reset-Initialize-hibernate-wakeup-counte.patch deleted file mode 100644 index b4e484321..000000000 --- a/target/linux/xburst/patches-3.3/0014-MIPS-JZ4740-reset-Initialize-hibernate-wakeup-counte.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 2dcb0ca66d0bffc23d5f001fad81fb1a7a2c371b Mon Sep 17 00:00:00 2001 -From: Maarten ter Huurne <maarten@treewalker.org> -Date: Tue, 28 Jun 2011 22:28:59 +0200 -Subject: [PATCH 14/21] MIPS: JZ4740: reset: Initialize hibernate wakeup - counters. - -In hibernation mode only the wakeup logic and the RTC are left running, -so this is what users perceive as power down. - -If the counters are not initialized, the corresponding pin (typically -connected to the power button) has to be asserted for two seconds -before the device wakes up. Most users expect a shorter wakeup time. - -I took the timing values of 100 ms and 60 ms from BouKiCHi's patch for -the Dingoo A320 kernel. ---- - arch/mips/jz4740/reset.c | 46 ++++++++++++++++++++++++++++++++++++++++------ - 1 files changed, 40 insertions(+), 6 deletions(-) - ---- a/arch/mips/jz4740/reset.c -+++ b/arch/mips/jz4740/reset.c -@@ -21,6 +21,9 @@ - #include <asm/mach-jz4740/base.h> - #include <asm/mach-jz4740/timer.h> - -+#include "reset.h" -+#include "clock.h" -+ - static void jz4740_halt(void) - { - while (1) { -@@ -53,21 +56,52 @@ static void jz4740_restart(char *command - jz4740_halt(); - } - --#define JZ_REG_RTC_CTRL 0x00 --#define JZ_REG_RTC_HIBERNATE 0x20 -- --#define JZ_RTC_CTRL_WRDY BIT(7) -+#define JZ_REG_RTC_CTRL 0x00 -+#define JZ_REG_RTC_HIBERNATE 0x20 -+#define JZ_REG_RTC_WAKEUP_FILTER 0x24 -+#define JZ_REG_RTC_RESET_COUNTER 0x28 -+ -+#define JZ_RTC_CTRL_WRDY BIT(7) -+#define JZ_RTC_WAKEUP_FILTER_MASK 0x0000FFE0 -+#define JZ_RTC_RESET_COUNTER_MASK 0x00000FE0 - --static void jz4740_power_off(void) -+static inline void jz4740_rtc_wait_ready(void __iomem *rtc_base) - { -- void __iomem *rtc_base = ioremap(JZ4740_RTC_BASE_ADDR, 0x24); - uint32_t ctrl; -- - do { - ctrl = readl(rtc_base + JZ_REG_RTC_CTRL); - } while (!(ctrl & JZ_RTC_CTRL_WRDY)); -+} - -+static void jz4740_power_off(void) -+{ -+ void __iomem *rtc_base = ioremap(JZ4740_RTC_BASE_ADDR, 0x38); -+ unsigned long long wakeup_filter_ticks; -+ unsigned long long reset_counter_ticks; -+ -+ /* Set minimum wakeup pin assertion time: 100 ms. -+ Range is 0 to 2 sec if RTC is clocked at 32 kHz. */ -+ wakeup_filter_ticks = (100 * jz4740_clock_bdata.rtc_rate) / 1000; -+ if (wakeup_filter_ticks < JZ_RTC_WAKEUP_FILTER_MASK) -+ wakeup_filter_ticks &= JZ_RTC_WAKEUP_FILTER_MASK; -+ else -+ wakeup_filter_ticks = JZ_RTC_WAKEUP_FILTER_MASK; -+ jz4740_rtc_wait_ready(rtc_base); -+ writel(wakeup_filter_ticks, rtc_base + JZ_REG_RTC_WAKEUP_FILTER); -+ -+ /* Set reset pin low-level assertion time after wakeup: 60 ms. -+ Range is 0 to 125 ms if RTC is clocked at 32 kHz. */ -+ reset_counter_ticks = (60 * jz4740_clock_bdata.rtc_rate) / 1000; -+ if (reset_counter_ticks < JZ_RTC_RESET_COUNTER_MASK) -+ reset_counter_ticks &= JZ_RTC_RESET_COUNTER_MASK; -+ else -+ reset_counter_ticks = JZ_RTC_RESET_COUNTER_MASK; -+ jz4740_rtc_wait_ready(rtc_base); -+ writel(reset_counter_ticks, rtc_base + JZ_REG_RTC_RESET_COUNTER); -+ -+ jz4740_rtc_wait_ready(rtc_base); - writel(1, rtc_base + JZ_REG_RTC_HIBERNATE); -+ - jz4740_halt(); - } - diff --git a/target/linux/xburst/patches-3.3/0015-ASoC-JZ4740-Replaced-comma-operators-with-semicolons.patch b/target/linux/xburst/patches-3.3/0015-ASoC-JZ4740-Replaced-comma-operators-with-semicolons.patch deleted file mode 100644 index 9e812e1ca..000000000 --- a/target/linux/xburst/patches-3.3/0015-ASoC-JZ4740-Replaced-comma-operators-with-semicolons.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 515f8006c03e1065bf98c9148a9ea787e2d120d3 Mon Sep 17 00:00:00 2001 -From: Maarten ter Huurne <maarten@treewalker.org> -Date: Wed, 10 Aug 2011 00:20:16 +0200 -Subject: [PATCH 15/21] ASoC: JZ4740: Replaced comma operators with - semicolons. - -They were harmless but also unnecessary, probably a leftover from earlier code. ---- - sound/soc/jz4740/jz4740-i2s.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - ---- a/sound/soc/jz4740/jz4740-i2s.c -+++ b/sound/soc/jz4740/jz4740-i2s.c -@@ -346,7 +346,7 @@ static void jz4740_i2c_init_pcm_config(s - - /* Playback */ - dma_config = &i2s->pcm_config_playback.dma_config; -- dma_config->src_width = JZ4740_DMA_WIDTH_32BIT, -+ dma_config->src_width = JZ4740_DMA_WIDTH_32BIT; - dma_config->transfer_size = JZ4740_DMA_TRANSFER_SIZE_16BYTE; - dma_config->request_type = JZ4740_DMA_TYPE_AIC_TRANSMIT; - dma_config->flags = JZ4740_DMA_SRC_AUTOINC; -@@ -355,7 +355,7 @@ static void jz4740_i2c_init_pcm_config(s - - /* Capture */ - dma_config = &i2s->pcm_config_capture.dma_config; -- dma_config->dst_width = JZ4740_DMA_WIDTH_32BIT, -+ dma_config->dst_width = JZ4740_DMA_WIDTH_32BIT; - dma_config->transfer_size = JZ4740_DMA_TRANSFER_SIZE_16BYTE; - dma_config->request_type = JZ4740_DMA_TYPE_AIC_RECEIVE; - dma_config->flags = JZ4740_DMA_DST_AUTOINC; diff --git a/target/linux/xburst/patches-3.3/0017-MIPS-JZ4740-qi_lb60-Look-for-NAND-chip-in-bank-1.patch b/target/linux/xburst/patches-3.3/0017-MIPS-JZ4740-qi_lb60-Look-for-NAND-chip-in-bank-1.patch deleted file mode 100644 index f6b11540a..000000000 --- a/target/linux/xburst/patches-3.3/0017-MIPS-JZ4740-qi_lb60-Look-for-NAND-chip-in-bank-1.patch +++ /dev/null @@ -1,21 +0,0 @@ -From cdb15b56aa9517a8cdbd14724088227514622a1b Mon Sep 17 00:00:00 2001 -From: Maarten ter Huurne <maarten@treewalker.org> -Date: Wed, 11 Jan 2012 22:36:03 +0100 -Subject: [PATCH 17/21] MIPS: JZ4740: qi_lb60: Look for NAND chip in bank 1. - -All NanoNotes have their NAND in bank 1. -Specifying the bank is required since commit e7ca5a665877a030. ---- - arch/mips/jz4740/board-qi_lb60.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - ---- a/arch/mips/jz4740/board-qi_lb60.c -+++ b/arch/mips/jz4740/board-qi_lb60.c -@@ -140,6 +140,7 @@ static void qi_lb60_nand_ident(struct pl - static struct jz_nand_platform_data qi_lb60_nand_pdata = { - .ident_callback = qi_lb60_nand_ident, - .busy_gpio = 94, -+ .banks = { 1 }, - }; - - /* Keyboard*/ diff --git a/target/linux/xburst/patches-3.3/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch b/target/linux/xburst/patches-3.3/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch deleted file mode 100644 index e7e617510..000000000 --- a/target/linux/xburst/patches-3.3/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 94f2b91d2a42854a8869d54a758bc88757d7f6d9 Mon Sep 17 00:00:00 2001 -From: Axel Lin <axel.lin@gmail.com> -Date: Fri, 6 Jan 2012 11:30:10 +0800 -Subject: [PATCH 18/21] ASoC: jz4740: Convert qi_lb60 to use - snd_soc_register_card() - -Use snd_soc_register_card() instead of creating a "soc-audio" platform device. - -Signed-off-by: Axel Lin <axel.lin@gmail.com> ---- - arch/mips/jz4740/board-qi_lb60.c | 6 ++++ - sound/soc/jz4740/qi_lb60.c | 56 +++++++++++++++++-------------------- - 2 files changed, 32 insertions(+), 30 deletions(-) - ---- a/arch/mips/jz4740/board-qi_lb60.c -+++ b/arch/mips/jz4740/board-qi_lb60.c -@@ -418,6 +418,11 @@ static struct platform_device qi_lb60_ch - }, - }; - -+/* audio */ -+static struct platform_device qi_lb60_audio_device = { -+ .name = "qi-lb60-audio", -+ .id = -1, -+}; - - static struct platform_device *jz_platform_devices[] __initdata = { - &jz4740_udc_device, -@@ -434,6 +439,7 @@ static struct platform_device *jz_platfo - &qi_lb60_gpio_keys, - &qi_lb60_pwm_beeper, - &qi_lb60_charger_device, -+ &qi_lb60_audio_device, - }; - - static void __init board_gpio_setup(void) ---- a/sound/soc/jz4740/qi_lb60.c -+++ b/sound/soc/jz4740/qi_lb60.c -@@ -91,56 +91,52 @@ static struct snd_soc_card qi_lb60 = { - .num_dapm_routes = ARRAY_SIZE(qi_lb60_routes), - }; - --static struct platform_device *qi_lb60_snd_device; -- - static const struct gpio qi_lb60_gpios[] = { - { QI_LB60_SND_GPIO, GPIOF_OUT_INIT_LOW, "SND" }, - { QI_LB60_AMP_GPIO, GPIOF_OUT_INIT_LOW, "AMP" }, - }; - --static int __init qi_lb60_init(void) -+static int __devinit qi_lb60_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &qi_lb60; - int ret; - -- qi_lb60_snd_device = platform_device_alloc("soc-audio", -1); -- -- if (!qi_lb60_snd_device) -- return -ENOMEM; -- - ret = gpio_request_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); -- if (ret) { -- pr_err("qi_lb60 snd: Failed to request gpios: %d\n", ret); -- goto err_device_put; -- } -+ if (ret) -+ return ret; - -- platform_set_drvdata(qi_lb60_snd_device, &qi_lb60); -+ card->dev = &pdev->dev; - -- ret = platform_device_add(qi_lb60_snd_device); -+ ret = snd_soc_register_card(card); - if (ret) { -- pr_err("qi_lb60 snd: Failed to add snd soc device: %d\n", ret); -- goto err_unset_pdata; -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); - } -- -- return 0; -- --err_unset_pdata: -- platform_set_drvdata(qi_lb60_snd_device, NULL); --/*err_gpio_free_array:*/ -- gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); --err_device_put: -- platform_device_put(qi_lb60_snd_device); -- - return ret; - } --module_init(qi_lb60_init); - --static void __exit qi_lb60_exit(void) -+static int __devexit qi_lb60_remove(struct platform_device *pdev) - { -- platform_device_unregister(qi_lb60_snd_device); -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); - gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); -+ return 0; - } --module_exit(qi_lb60_exit); -+ -+static struct platform_driver qi_lb60_driver = { -+ .driver = { -+ .name = "qi-lb60-audio", -+ .owner = THIS_MODULE, -+ }, -+ .probe = qi_lb60_probe, -+ .remove = __devexit_p(qi_lb60_remove), -+}; -+ -+module_platform_driver(qi_lb60_driver); - - MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); - MODULE_DESCRIPTION("ALSA SoC QI LB60 Audio support"); - MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:qi-lb60-audio"); diff --git a/target/linux/xburst/patches-3.3/0019-Framebuffer-notifier-Call-notifier-callbacks-prior-t.patch b/target/linux/xburst/patches-3.3/0019-Framebuffer-notifier-Call-notifier-callbacks-prior-t.patch deleted file mode 100644 index 0876174e5..000000000 --- a/target/linux/xburst/patches-3.3/0019-Framebuffer-notifier-Call-notifier-callbacks-prior-t.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 159c4d81899db05a57bc4a0d55083e484c3d8a43 Mon Sep 17 00:00:00 2001 -From: Lars-Peter Clausen <lars@metafoo.de> -Date: Sat, 24 Apr 2010 12:23:28 +0200 -Subject: [PATCH 19/21] Framebuffer notifier: Call notifier callbacks prior to - blanking the screen - ---- - drivers/video/fbmem.c | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - ---- a/drivers/video/fbmem.c -+++ b/drivers/video/fbmem.c -@@ -1046,12 +1046,12 @@ fb_set_var(struct fb_info *info, struct - int - fb_blank(struct fb_info *info, int blank) - { -- int ret = -EINVAL; -+ int ret = 0; - - if (blank > FB_BLANK_POWERDOWN) - blank = FB_BLANK_POWERDOWN; - -- if (info->fbops->fb_blank) -+ if (info->fbops->fb_blank && blank == FB_BLANK_UNBLANK) - ret = info->fbops->fb_blank(blank, info); - - if (!ret) { -@@ -1062,6 +1062,10 @@ fb_blank(struct fb_info *info, int blank - fb_notifier_call_chain(FB_EVENT_BLANK, &event); - } - -+ if (info->fbops->fb_blank && blank != FB_BLANK_UNBLANK) -+ ret = info->fbops->fb_blank(blank, info); -+ -+ - return ret; - } - diff --git a/target/linux/xburst/patches-3.3/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch b/target/linux/xburst/patches-3.8/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch index 51f81cfcf..26b43d0dd 100644 --- a/target/linux/xburst/patches-3.3/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch +++ b/target/linux/xburst/patches-3.8/0001-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch @@ -10,7 +10,7 @@ Subject: [PATCH 01/21] ubi: Read only the vid header instead of the whole --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c -@@ -1030,7 +1030,7 @@ int ubi_io_read_vid_hdr(struct ubi_devic +@@ -1019,7 +1019,7 @@ int ubi_io_read_vid_hdr(struct ubi_devic p = (char *)vid_hdr - ubi->vid_hdr_shift; read_err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset, diff --git a/target/linux/xburst/patches-3.3/0002-Add-jz4740-udc-driver.patch b/target/linux/xburst/patches-3.8/0002-Add-jz4740-udc-driver.patch index 9986ce08d..05a433a7c 100644 --- a/target/linux/xburst/patches-3.3/0002-Add-jz4740-udc-driver.patch +++ b/target/linux/xburst/patches-3.8/0002-Add-jz4740-udc-driver.patch @@ -19,7 +19,7 @@ History: --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig -@@ -178,6 +178,14 @@ config USB_FUSB300 +@@ -191,6 +191,14 @@ config USB_FUSB300 help Faraday usb device controller FUSB300 driver @@ -33,36 +33,27 @@ History: + config USB_OMAP tristate "OMAP USB Device Controller" - depends on ARCH_OMAP + depends on ARCH_OMAP1 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile -@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_MV_UDC) += mv_udc.o +@@ -34,6 +34,7 @@ obj-$(CONFIG_USB_MV_UDC) += mv_udc.o mv_udc-y := mv_udc_core.o - obj-$(CONFIG_USB_CI13XXX_MSM) += ci13xxx_msm.o obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o + obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o +obj-$(CONFIG_USB_JZ4740) += jz4740_udc.o # # USB gadget drivers --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h -@@ -36,6 +36,7 @@ - #define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name)) +@@ -30,6 +30,7 @@ + #define gadget_is_at91(g) (!strcmp("at91_udc", (g)->name)) #define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name)) - #define gadget_is_imx(g) (!strcmp("imx_udc", (g)->name)) -+#define gadget_is_jz4740(g) (!strcmp("ingenic_hsusb", (g)->name)) - #define gadget_is_langwell(g) (!strcmp("langwell_udc", (g)->name)) - #define gadget_is_m66592(g) (!strcmp("m66592_udc", (g)->name)) #define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name)) -@@ -118,6 +119,8 @@ static inline int usb_gadget_controller_ - return 0x31; - else if (gadget_is_dwc3(gadget)) - return 0x32; -+ else if (gadget_is_jz4740(gadget)) -+ return 0x33; - - return -ENOENT; - } ++#define gadget_is_jz4740(g) (!strcmp("ingenic_hsusb", (g)->name)) + #define gadget_is_net2280(g) (!strcmp("net2280", (g)->name)) + #define gadget_is_pxa(g) (!strcmp("pxa25x_udc", (g)->name)) + #define gadget_is_pxa27x(g) (!strcmp("pxa27x_udc", (g)->name)) --- /dev/null +++ b/drivers/usb/gadget/jz4740_udc.c @@ -0,0 +1,2199 @@ @@ -2105,7 +2096,7 @@ History: + }, +}; + -+static int __devinit jz4740_udc_probe(struct platform_device *pdev) ++static int jz4740_udc_probe(struct platform_device *pdev) +{ + struct jz4740_udc *jz4740_udc = &jz4740_udc_controller; + int ret; @@ -2188,7 +2179,7 @@ History: + return ret; +} + -+static int __devexit jz4740_udc_remove(struct platform_device *pdev) ++static int jz4740_udc_remove(struct platform_device *pdev) +{ + struct jz4740_udc *dev = platform_get_drvdata(pdev); + @@ -2240,7 +2231,7 @@ History: + +static struct platform_driver udc_driver = { + .probe = jz4740_udc_probe, -+ .remove = __devexit_p(jz4740_udc_remove), ++ .remove = jz4740_udc_remove, + .driver = { + .name = "jz-udc", + .owner = THIS_MODULE, diff --git a/target/linux/xburst/patches-3.3/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch b/target/linux/xburst/patches-3.8/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch index 9583ab76c..2cc3cb00b 100644 --- a/target/linux/xburst/patches-3.3/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch +++ b/target/linux/xburst/patches-3.8/0003-NAND-Optimize-NAND_ECC_HW_OOB_FIRST-read.patch @@ -10,8 +10,8 @@ Avoid sending unnecessary READ commands to the chip. --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -1294,9 +1294,15 @@ static int nand_read_page_hwecc_oob_firs - uint8_t *ecc_calc = chip->buffers->ecccalc; +@@ -1299,9 +1299,15 @@ static int nand_read_page_hwecc_oob_firs + unsigned int max_bitflips = 0; /* Read the OOB area first */ - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); @@ -29,12 +29,3 @@ Avoid sending unnecessary READ commands to the chip. for (i = 0; i < chip->ecc.total; i++) ecc_code[i] = chip->oob_poi[eccpos[i]]; -@@ -1465,7 +1471,7 @@ static int nand_do_read_ops(struct mtd_i - if (realpage != chip->pagebuf || oob) { - bufpoi = aligned ? buf : chip->buffers->databuf; - -- if (likely(sndcmd)) { -+ if (likely(sndcmd) && chip->ecc.mode != NAND_ECC_HW_OOB_FIRST) { - chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); - sndcmd = 0; - } diff --git a/target/linux/xburst/patches-3.3/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch b/target/linux/xburst/patches-3.8/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch index 477d3723e..194df5920 100644 --- a/target/linux/xburst/patches-3.3/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch +++ b/target/linux/xburst/patches-3.8/0004-NAND-Add-support-for-subpage-reads-for-NAND_ECC_HW_O.patch @@ -11,7 +11,7 @@ Subject: [PATCH 04/21] NAND: Add support for subpage reads for --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -1143,7 +1143,7 @@ static int nand_read_page_swecc(struct m +@@ -1139,7 +1139,7 @@ static int nand_read_page_swecc(struct m * @bufpoi: buffer to store read data */ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, @@ -20,7 +20,7 @@ Subject: [PATCH 04/21] NAND: Add support for subpage reads for { int start_step, end_step, num_steps; uint32_t *eccpos = chip->ecc.layout->eccpos; -@@ -1324,6 +1324,75 @@ static int nand_read_page_hwecc_oob_firs +@@ -1331,6 +1331,75 @@ static int nand_read_page_hwecc_oob_firs } /** @@ -96,16 +96,16 @@ Subject: [PATCH 04/21] NAND: Add support for subpage reads for * nand_read_page_syndrome - [REPLACEABLE] hardware ECC syndrome based page read * @mtd: mtd info structure * @chip: nand chip info structure -@@ -1482,7 +1551,7 @@ static int nand_do_read_ops(struct mtd_i - bufpoi, page); - else if (!aligned && NAND_SUBPAGE_READ(chip) && !oob) +@@ -1495,7 +1564,7 @@ static int nand_do_read_ops(struct mtd_i + else if (!aligned && NAND_HAS_SUBPAGE_READ(chip) && + !oob) ret = chip->ecc.read_subpage(mtd, chip, - col, bytes, bufpoi); + col, bytes, bufpoi, page); else ret = chip->ecc.read_page(mtd, chip, bufpoi, - page); -@@ -3293,8 +3362,11 @@ int nand_scan_tail(struct mtd_info *mtd) + oob_required, page); +@@ -3451,8 +3520,11 @@ int nand_scan_tail(struct mtd_info *mtd) "hardware ECC not possible\n"); BUG(); } @@ -120,25 +120,12 @@ Subject: [PATCH 04/21] NAND: Add support for subpage reads for /* Use standard hwecc read page function? */ --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h -@@ -211,9 +211,9 @@ typedef enum { - #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) - #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) - #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) --/* Large page NAND with SOFT_ECC should support subpage reads */ --#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \ -- && (chip->page_shift > 9)) -+/* Large page NAND with read_subpage set should support subpage reads */ -+#define NAND_SUBPAGE_READ(chip) (((chip)->ecc.read_subpage) \ -+ && ((chip)->page_shift > 9)) - - /* Mask to zero out the chip options, which come from the id table */ - #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) -@@ -367,7 +367,7 @@ struct nand_ecc_ctrl { +@@ -384,7 +384,7 @@ struct nand_ecc_ctrl { int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf, int page); + uint8_t *buf, int oob_required, int page); int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, - uint32_t offs, uint32_t len, uint8_t *buf); + uint32_t offs, uint32_t len, uint8_t *buf, int page); - void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf); + int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, + const uint8_t *buf, int oob_required); int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, diff --git a/target/linux/xburst/patches-3.3/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch b/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch index 38a139507..e65ae6e1d 100644 --- a/target/linux/xburst/patches-3.3/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch +++ b/target/linux/xburst/patches-3.8/0005-NAND-Optimize-reading-the-eec-data-for-the-JZ4740.patch @@ -9,7 +9,7 @@ Subject: [PATCH 05/21] NAND-Optimize-reading-the-eec-data-for-the-JZ4740 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -1295,8 +1295,8 @@ static int nand_read_page_hwecc_oob_firs +@@ -1300,8 +1300,8 @@ static int nand_read_page_hwecc_oob_firs /* Read the OOB area first */ if (mtd->writesize > 512) { @@ -20,7 +20,7 @@ Subject: [PATCH 05/21] NAND-Optimize-reading-the-eec-data-for-the-JZ4740 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0, -1); } else { chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); -@@ -1304,9 +1304,6 @@ static int nand_read_page_hwecc_oob_firs +@@ -1309,9 +1309,6 @@ static int nand_read_page_hwecc_oob_firs chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); } @@ -30,7 +30,7 @@ Subject: [PATCH 05/21] NAND-Optimize-reading-the-eec-data-for-the-JZ4740 for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { int stat; -@@ -1361,8 +1358,8 @@ static int nand_read_subpage_hwecc_oob_f +@@ -1368,8 +1365,8 @@ static int nand_read_subpage_hwecc_oob_f /* Read the OOB area first */ if (mtd->writesize > 512) { @@ -41,7 +41,7 @@ Subject: [PATCH 05/21] NAND-Optimize-reading-the-eec-data-for-the-JZ4740 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, data_col_addr, -1); } else { chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); -@@ -1370,9 +1367,6 @@ static int nand_read_subpage_hwecc_oob_f +@@ -1377,9 +1374,6 @@ static int nand_read_subpage_hwecc_oob_f chip->cmdfunc(mtd, NAND_CMD_READ0, data_col_addr, page); } diff --git a/target/linux/xburst/patches-3.3/0007-Add-ili8960-lcd-driver.patch b/target/linux/xburst/patches-3.8/0007-Add-ili8960-lcd-driver.patch index d7eaa0793..37fa931fa 100644 --- a/target/linux/xburst/patches-3.3/0007-Add-ili8960-lcd-driver.patch +++ b/target/linux/xburst/patches-3.8/0007-Add-ili8960-lcd-driver.patch @@ -24,8 +24,8 @@ Subject: [PATCH 07/21] Add ili8960 lcd driver + Driver for the Ilitek ili8960 LCD controller chip. + config LCD_ILI9320 - tristate - help + tristate "ILI Technology ILI9320 controller support" + depends on SPI --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_LCD_HP700) += jornada72 @@ -186,7 +186,7 @@ Subject: [PATCH 07/21] Add ili8960 lcd driver + .set_mode = ili8960_set_mode, +}; + -+static int __devinit ili8960_probe(struct spi_device *spi) ++static int ili8960_probe(struct spi_device *spi) +{ + int ret; + struct ili8960 *ili8960; @@ -236,7 +236,7 @@ Subject: [PATCH 07/21] Add ili8960 lcd driver + return ret; +} + -+static int __devexit ili8960_remove(struct spi_device *spi) ++static int ili8960_remove(struct spi_device *spi) +{ + struct ili8960 *ili8960 = spi_get_drvdata(spi); + @@ -281,7 +281,7 @@ Subject: [PATCH 07/21] Add ili8960 lcd driver + .owner = THIS_MODULE, + }, + .probe = ili8960_probe, -+ .remove = __devexit_p(ili8960_remove), ++ .remove = ili8960_remove, + .suspend = ili8960_suspend, + .resume = ili8960_resume, +}; diff --git a/target/linux/xburst/patches-3.3/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch b/target/linux/xburst/patches-3.8/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch index 223459cab..640553d89 100644 --- a/target/linux/xburst/patches-3.3/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch +++ b/target/linux/xburst/patches-3.8/0008-qi_lb60-Don-t-use-3-wire-spi-mode-for-the-display-fo.patch @@ -11,7 +11,7 @@ The spi_gpio driver does not support 3-wire mode. --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c -@@ -310,7 +310,6 @@ static struct spi_board_info qi_lb60_spi +@@ -311,7 +311,6 @@ static struct spi_board_info qi_lb60_spi .chip_select = 0, .bus_num = 1, .max_speed_hz = 30 * 1000, diff --git a/target/linux/xburst/patches-3.3/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch b/target/linux/xburst/patches-3.8/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch index 28388fba7..4ccaec509 100644 --- a/target/linux/xburst/patches-3.3/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch +++ b/target/linux/xburst/patches-3.8/0009-dev-mem-Add-kernel-config-option-to-omit-this-device.patch @@ -43,7 +43,7 @@ It also saves some space on embedded systems. default y --- a/drivers/char/mem.c +++ b/drivers/char/mem.c -@@ -87,6 +87,8 @@ void __weak unxlate_dev_mem_ptr(unsigned +@@ -89,6 +89,8 @@ void __weak unxlate_dev_mem_ptr(unsigned { } @@ -52,7 +52,7 @@ It also saves some space on embedded systems. /* * This funcion reads the *physical* memory. The f_pos points directly to the * memory location. -@@ -210,6 +212,10 @@ static ssize_t write_mem(struct file *fi +@@ -212,6 +214,10 @@ static ssize_t write_mem(struct file *fi return written; } @@ -63,7 +63,7 @@ It also saves some space on embedded systems. int __weak phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, unsigned long size, pgprot_t *vma_prot) { -@@ -331,6 +337,8 @@ static int mmap_mem(struct file *file, s +@@ -333,6 +339,8 @@ static int mmap_mem(struct file *file, s return 0; } @@ -72,7 +72,7 @@ It also saves some space on embedded systems. #ifdef CONFIG_DEVKMEM static int mmap_kmem(struct file *file, struct vm_area_struct *vma) { -@@ -694,6 +702,7 @@ static loff_t null_lseek(struct file *fi +@@ -696,6 +704,7 @@ static loff_t null_lseek(struct file *fi return file->f_pos = 0; } @@ -80,7 +80,7 @@ It also saves some space on embedded systems. /* * The memory devices use the full 32/64 bits of the offset, and so we cannot * check against negative addresses: they are ok. The return value is weird, -@@ -726,11 +735,15 @@ static loff_t memory_lseek(struct file * +@@ -728,11 +737,15 @@ static loff_t memory_lseek(struct file * mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); return ret; } @@ -96,7 +96,7 @@ It also saves some space on embedded systems. #define zero_lseek null_lseek #define full_lseek null_lseek -@@ -740,6 +753,7 @@ static int open_port(struct inode * inod +@@ -742,6 +755,7 @@ static int open_port(struct inode * inod #define open_kmem open_mem #define open_oldmem open_mem @@ -104,7 +104,7 @@ It also saves some space on embedded systems. static const struct file_operations mem_fops = { .llseek = memory_lseek, .read = read_mem, -@@ -748,6 +762,7 @@ static const struct file_operations mem_ +@@ -750,6 +764,7 @@ static const struct file_operations mem_ .open = open_mem, .get_unmapped_area = get_unmapped_area_mem, }; @@ -112,7 +112,7 @@ It also saves some space on embedded systems. #ifdef CONFIG_DEVKMEM static const struct file_operations kmem_fops = { -@@ -851,7 +866,9 @@ static const struct memdev { +@@ -815,7 +830,9 @@ static const struct memdev { const struct file_operations *fops; struct backing_dev_info *dev_info; } devlist[] = { diff --git a/target/linux/xburst/patches-3.3/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch b/target/linux/xburst/patches-3.8/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch index 95803e313..f526eaba3 100644 --- a/target/linux/xburst/patches-3.3/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch +++ b/target/linux/xburst/patches-3.8/0010-cpufreq_stats-Support-runtime-changes-to-frequency-t.patch @@ -24,7 +24,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency unsigned int state_num; - unsigned int last_index; + int last_index; - cputime64_t *time_in_state; + u64 *time_in_state; unsigned int *freq_table; #ifdef CONFIG_CPU_FREQ_STAT_DETAILS @@ -59,7 +60,7 @@ static int cpufreq_stats_update(unsigned @@ -128,7 +128,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) { unsigned int freq = table[i].frequency; -@@ -223,40 +196,73 @@ static int cpufreq_stats_create_table(st +@@ -223,40 +196,76 @@ static int cpufreq_stats_create_table(st count++; } @@ -137,8 +137,9 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency + kfree(stat->time_in_state); + stat->time_in_state = NULL; + } - alloc_size = count * sizeof(int) + count * sizeof(cputime64_t); -- ++ + alloc_size = count * sizeof(int) + count * sizeof(u64); + #ifdef CONFIG_CPU_FREQ_STAT_DETAILS alloc_size += count * count * sizeof(int); #endif @@ -180,6 +181,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency + stat->freq_table[j++] = freq; + } } ++ stat->state_num = j; spin_lock(&cpufreq_stats_lock); stat->last_time = get_jiffies_64(); @@ -220,7 +222,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency kfree(stat); per_cpu(cpufreq_stats_table, cpu) = NULL; return ret; -@@ -274,10 +280,12 @@ static int cpufreq_stat_notifier_policy( +@@ -274,10 +283,12 @@ static int cpufreq_stat_notifier_policy( table = cpufreq_frequency_get_table(cpu); if (!table) return 0; @@ -237,7 +239,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency } static int cpufreq_stat_notifier_trans(struct notifier_block *nb, -@@ -297,21 +305,23 @@ static int cpufreq_stat_notifier_trans(s +@@ -297,21 +308,23 @@ static int cpufreq_stat_notifier_trans(s old_index = stat->last_index; new_index = freq_table_get_index(stat, freq->new); @@ -268,17 +270,18 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency spin_unlock(&cpufreq_stats_lock); return 0; } -@@ -327,9 +337,6 @@ static int __cpuinit cpufreq_stat_cpu_ca +@@ -327,10 +340,6 @@ static int __cpuinit cpufreq_stat_cpu_ca case CPU_ONLINE_FROZEN: cpufreq_update_policy(cpu); break; - case CPU_DOWN_PREPARE: +- case CPU_DOWN_PREPARE_FROZEN: - cpufreq_stats_free_sysfs(cpu); - break; case CPU_DEAD: case CPU_DEAD_FROZEN: cpufreq_stats_free_table(cpu); -@@ -338,10 +345,9 @@ static int __cpuinit cpufreq_stat_cpu_ca +@@ -339,10 +348,9 @@ static int __cpuinit cpufreq_stat_cpu_ca return NOTIFY_OK; } @@ -291,7 +294,7 @@ Subject: [PATCH 10/21] cpufreq_stats: Support runtime changes to frequency }; static struct notifier_block notifier_policy_block = { -@@ -388,7 +394,6 @@ static void __exit cpufreq_stats_exit(vo +@@ -392,7 +400,6 @@ static void __exit cpufreq_stats_exit(vo unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier); for_each_online_cpu(cpu) { cpufreq_stats_free_table(cpu); diff --git a/target/linux/xburst/patches-3.3/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch b/target/linux/xburst/patches-3.8/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch index 01c211ba7..01c211ba7 100644 --- a/target/linux/xburst/patches-3.3/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch +++ b/target/linux/xburst/patches-3.8/0011-MIPS-JZ4740-Added-setting-of-PLL-rate-and-main-divid.patch diff --git a/target/linux/xburst/patches-3.3/0012-MIPS-JZ4740-Add-cpufreq-support.patch b/target/linux/xburst/patches-3.8/0012-MIPS-JZ4740-Add-cpufreq-support.patch index c0e3bab74..54883ea77 100644 --- a/target/linux/xburst/patches-3.3/0012-MIPS-JZ4740-Add-cpufreq-support.patch +++ b/target/linux/xburst/patches-3.8/0012-MIPS-JZ4740-Add-cpufreq-support.patch @@ -14,7 +14,7 @@ This is a squashed version of Uli's driver that was further developed in the ope --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -212,6 +212,7 @@ config MACH_JZ4740 +@@ -228,6 +228,7 @@ config MACH_JZ4740 select HAVE_PWM select HAVE_CLK select GENERIC_IRQ_CHIP @@ -24,13 +24,11 @@ This is a squashed version of Uli's driver that was further developed in the ope bool "Lantiq based platforms" --- a/arch/mips/jz4740/Makefile +++ b/arch/mips/jz4740/Makefile -@@ -16,5 +16,6 @@ obj-$(CONFIG_JZ4740_QI_LB60) += board-qi +@@ -16,3 +16,4 @@ obj-$(CONFIG_JZ4740_QI_LB60) += board-qi # PM support obj-$(CONFIG_PM) += pm.o +obj-$(CONFIG_CPU_FREQ_JZ) += cpufreq.o - - ccflags-y := -Werror -Wall --- /dev/null +++ b/arch/mips/jz4740/cpufreq.c @@ -0,0 +1,226 @@ diff --git a/target/linux/xburst/patches-3.3/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch b/target/linux/xburst/patches-3.8/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch index f42d67a6f..1fb41fa4f 100644 --- a/target/linux/xburst/patches-3.3/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch +++ b/target/linux/xburst/patches-3.8/0013-MMC-JZ4740-Added-support-for-CPU-frequency-changing.patch @@ -81,7 +81,7 @@ Also the frequency change is postponed if an I/O operation is in progress. static const struct mmc_host_ops jz4740_mmc_ops = { .request = jz4740_mmc_request, .set_ios = jz4740_mmc_set_ios, -@@ -834,11 +889,18 @@ static int __devinit jz4740_mmc_probe(st +@@ -834,11 +889,18 @@ static int jz4740_mmc_probe(struct platf goto err_free_host; } @@ -101,7 +101,7 @@ Also the frequency change is postponed if an I/O operation is in progress. } host->mem = request_mem_region(host->mem->start, -@@ -846,7 +908,7 @@ static int __devinit jz4740_mmc_probe(st +@@ -846,7 +908,7 @@ static int jz4740_mmc_probe(struct platf if (!host->mem) { ret = -EBUSY; dev_err(&pdev->dev, "Failed to request base memory region\n"); @@ -119,7 +119,7 @@ Also the frequency change is postponed if an I/O operation is in progress. err_clk_put: clk_put(host->clk); err_free_host: -@@ -958,6 +1022,7 @@ static int __devexit jz4740_mmc_remove(s +@@ -958,6 +1022,7 @@ static int jz4740_mmc_remove(struct plat iounmap(host->base); release_mem_region(host->mem->start, resource_size(host->mem)); diff --git a/target/linux/xburst/patches-3.3/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch b/target/linux/xburst/patches-3.8/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch index 552f811d6..552f811d6 100644 --- a/target/linux/xburst/patches-3.3/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch +++ b/target/linux/xburst/patches-3.8/0016-ASoC-JZ4740-Support-buffer-size-that-is-not-a-multip.patch diff --git a/target/linux/xburst/patches-3.3/0020-qi_lb60-NAND-add-data-partition.patch b/target/linux/xburst/patches-3.8/0020-qi_lb60-NAND-add-data-partition.patch index 9d45dd869..9d45dd869 100644 --- a/target/linux/xburst/patches-3.3/0020-qi_lb60-NAND-add-data-partition.patch +++ b/target/linux/xburst/patches-3.8/0020-qi_lb60-NAND-add-data-partition.patch diff --git a/target/linux/xburst/patches-3.3/0021-rtc-jz4740-fix-hwclock-give-time-out.patch b/target/linux/xburst/patches-3.8/0021-rtc-jz4740-fix-hwclock-give-time-out.patch index b68033d3b..b69698179 100644 --- a/target/linux/xburst/patches-3.3/0021-rtc-jz4740-fix-hwclock-give-time-out.patch +++ b/target/linux/xburst/patches-3.8/0021-rtc-jz4740-fix-hwclock-give-time-out.patch @@ -9,7 +9,7 @@ Subject: [PATCH 21/21] rtc: jz4740 fix hwclock give time out --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c -@@ -280,6 +280,8 @@ static int __devinit jz4740_rtc_probe(st +@@ -280,6 +280,8 @@ static int jz4740_rtc_probe(struct platf } } diff --git a/target/linux/xburst/qi_lb60/config-3.3 b/target/linux/xburst/qi_lb60/config-3.8 index 22c5b3da8..1fd421b5f 100644 --- a/target/linux/xburst/qi_lb60/config-3.3 +++ b/target/linux/xburst/qi_lb60/config-3.8 @@ -1,6 +1,6 @@ # CONFIG_BACKLIGHT_CLASS_DEVICE is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_INPUT_PWM_BEEPER=y +CONFIG_INPUT_MATRIXKMAP=y CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_MATRIX=y CONFIG_LCD_CLASS_DEVICE=y |