mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	Add kernel sound packages
SVN-Revision: 20132
This commit is contained in:
		
							parent
							
								
									371f987651
								
							
						
					
					
						commit
						256f938e5a
					
				@ -10,7 +10,7 @@ ARCH:=mipsel
 | 
			
		||||
BOARD:=xburst
 | 
			
		||||
BOARDNAME:=Ingenic XBurst
 | 
			
		||||
FEATURES:=jffs2 tgz ubifs audio
 | 
			
		||||
SUBTARGETS:=qi_lb60 n526
 | 
			
		||||
SUBTARGETS:=qi_lb60 n516 n526
 | 
			
		||||
 | 
			
		||||
LINUX_VERSION:=2.6.32.9
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,7 @@ CONFIG_ENABLE_MUST_CHECK=y
 | 
			
		||||
CONFIG_EXT2_FS=y
 | 
			
		||||
CONFIG_EXT3_FS=y
 | 
			
		||||
CONFIG_FAT_FS=y
 | 
			
		||||
CONFIG_FB_JZ4740=y
 | 
			
		||||
# CONFIG_FB_JZ4740 is not set
 | 
			
		||||
CONFIG_FB_SYS_COPYAREA=y
 | 
			
		||||
CONFIG_FB_SYS_FILLRECT=y
 | 
			
		||||
CONFIG_FB_SYS_IMAGEBLIT=y
 | 
			
		||||
@ -293,30 +293,12 @@ CONFIG_SERIO=y
 | 
			
		||||
# CONFIG_SIBYTE_RHONE is not set
 | 
			
		||||
# CONFIG_SIBYTE_SENTOSA is not set
 | 
			
		||||
# CONFIG_SIBYTE_SWARM is not set
 | 
			
		||||
# CONFIG_SND_DRIVERS is not set
 | 
			
		||||
# CONFIG_SND_EMU10K1_SEQ is not set
 | 
			
		||||
CONFIG_SND_JACK=y
 | 
			
		||||
CONFIG_SND_JZ4740_SOC_I2S=y
 | 
			
		||||
# CONFIG_SND_JZ4740_SOC_QI_LB60 is not set
 | 
			
		||||
CONFIG_SND_JZ4740_SOC=y
 | 
			
		||||
CONFIG_SND_MIXER_OSS=y
 | 
			
		||||
# CONFIG_SND_OPL3_LIB_SEQ is not set
 | 
			
		||||
# CONFIG_SND_OPL4_LIB_SEQ is not set
 | 
			
		||||
CONFIG_SND_PCM_OSS=y
 | 
			
		||||
CONFIG_SND_PCM=y
 | 
			
		||||
# CONFIG_SND_RAWMIDI_SEQ is not set
 | 
			
		||||
# CONFIG_SND_SBAWE_SEQ is not set
 | 
			
		||||
# CONFIG_SND_SOC_ALL_CODECS is not set
 | 
			
		||||
CONFIG_SND_SOC_I2C_AND_SPI=y
 | 
			
		||||
CONFIG_SND_SOC_JZCODEC=y
 | 
			
		||||
CONFIG_SND_SOC=y
 | 
			
		||||
CONFIG_SND_TIMER=y
 | 
			
		||||
# CONFIG_SND_VERBOSE_PROCFS is not set
 | 
			
		||||
CONFIG_SND=y
 | 
			
		||||
CONFIG_SOC_JZ4740=y
 | 
			
		||||
# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set
 | 
			
		||||
CONFIG_SOUND_OSS_CORE=y
 | 
			
		||||
CONFIG_SOUND=y
 | 
			
		||||
# CONFIG_SND_SOC_JZCODEC is not set
 | 
			
		||||
# CONFIG_SND_SOC_JZ4740 is not set
 | 
			
		||||
# CONFIG_SND_JZ4740_SOC_N516 is not set
 | 
			
		||||
# CONFIG_SND_JZ4740_SOC_N526 is not set
 | 
			
		||||
# CONFIG_SND_JZ4740_SOC_QI_LB60 is not set
 | 
			
		||||
# CONFIG_SPI_SPIDEV is not set
 | 
			
		||||
# CONFIG_SQUASHFS is not set
 | 
			
		||||
# CONFIG_STAGING is not set
 | 
			
		||||
@ -378,7 +360,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=2
 | 
			
		||||
CONFIG_USB_GADGET=y
 | 
			
		||||
# CONFIG_USB_G_PRINTER is not set
 | 
			
		||||
# CONFIG_USB_G_SERIAL is not set
 | 
			
		||||
# CONFIG_USB_JZ4740 is not set
 | 
			
		||||
CONFIG_USB_JZ4740=y
 | 
			
		||||
# CONFIG_USB_MIDI_GADGET is not set
 | 
			
		||||
CONFIG_USB_SUPPORT=y
 | 
			
		||||
# CONFIG_USB_ZERO is not set
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,49 @@
 | 
			
		||||
ifeq ($(CONFIG_TARGET_xburst),y)
 | 
			
		||||
	SOUNDCORE_FILES = 
 | 
			
		||||
	SOUNDCORE_LOAD = 
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SOUND_MENU:=Sound Support
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-jz4740
 | 
			
		||||
  SUBMENU:=$(SOUND_MENU)
 | 
			
		||||
  DEPENDS:=kmod-sound-soc-core @TARGET_xburst
 | 
			
		||||
  TITLE:=JZ4740 SoC sound support
 | 
			
		||||
  KCONFIG:=CONFIG_SND_JZ4740_SOC CONFIG_SND_JZ4740_SOC_I2S @TARGET_xburst
 | 
			
		||||
  FILES:=$(LINUX_DIR)/sound/soc/jz4740/snd-soc-jz4740.$(LINUX_KMOD_SUFFIX) \
 | 
			
		||||
  $(LINUX_DIR)/sound/soc/jz4740/snd-soc-jz4740-i2s.$(LINUX_KMOD_SUFFIX)
 | 
			
		||||
  AUTOLOAD:=$(call AutoLoad,40,snd-soc-jz4740 snd-soc-jz4740-pcm)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-jzcodec
 | 
			
		||||
  SUBMENU:=$(SOUND_MENU)
 | 
			
		||||
  DEPENDS:=kmod-sound-soc-core @TARGET_xburst
 | 
			
		||||
  TITLE:=JZ4740 SoC internal codec support
 | 
			
		||||
  KCONFIG:=CONFIG_SND_SOC_JZCODEC
 | 
			
		||||
  FILES:=$(LINUX_DIR)/sound/soc/codecs/snd-soc-jzcodec.$(LINUX_KMOD_SUFFIX)
 | 
			
		||||
  AUTOLOAD:=$(call AutoLoad,40,snd-soc-jzcodec)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-xburst/default
 | 
			
		||||
  SUBMENU:=$(SOUND_MENU)
 | 
			
		||||
  DEPENDS:=kmod-sound-soc-jz4740 kmod-sound-soc-jzcodec @TARGET_xburst_$(if $(4),$(4),$(3))
 | 
			
		||||
  TITLE:=$(1) sound support
 | 
			
		||||
  KCONFIG:=CONFIG_SND_JZ4740_SOC_$(2)
 | 
			
		||||
  FILES:=$(LINUX_DIR)/sound/soc/jz4740/snd-soc-$(3).$(LINUX_KMOD_SUFFIX)
 | 
			
		||||
  AUTOLOAD:=$(call AutoLoad,45,snd-soc-$(3))
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-qi_lb60
 | 
			
		||||
$(call KernelPackage/sound-soc-xburst/default,QI NanoNote,QI_LB60,qi-lb60,qi_lb60)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-n516
 | 
			
		||||
$(call KernelPackage/sound-soc-xburst/default,Hanvon N516,N516,n516)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define KernelPackage/sound-soc-n526
 | 
			
		||||
$(call KernelPackage/sound-soc-xburst/default,Hanvon N526,N526,n526)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
$(eval $(call KernelPackage,sound-soc-jz4740))
 | 
			
		||||
$(eval $(call KernelPackage,sound-soc-jzcodec))
 | 
			
		||||
$(eval $(call KernelPackage,sound-soc-qi_lb60))
 | 
			
		||||
$(eval $(call KernelPackage,sound-soc-n516))
 | 
			
		||||
$(eval $(call KernelPackage,sound-soc-n526))
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,6 @@ CONFIG_FB_DEFERRED_IO=y
 | 
			
		||||
CONFIG_FB_JZ4740=y
 | 
			
		||||
CONFIG_FB_METRONOME=m
 | 
			
		||||
CONFIG_FB_SYS_FOPS=m
 | 
			
		||||
# CONFIG_FRAMEBUFFER_CONSOLE is not set
 | 
			
		||||
CONFIG_HWMON=y
 | 
			
		||||
# CONFIG_HWMON_DEBUG_CHIP is not set
 | 
			
		||||
CONFIG_I2C=y
 | 
			
		||||
@ -10,16 +9,9 @@ CONFIG_I2C_ALGOBIT=y
 | 
			
		||||
CONFIG_I2C_BOARDINFO=y
 | 
			
		||||
CONFIG_I2C_GPIO=y
 | 
			
		||||
CONFIG_JZ4740_N516=y
 | 
			
		||||
# CONFIG_KEYBOARD_GPIO is not set
 | 
			
		||||
CONFIG_LEDS_GPIO=y
 | 
			
		||||
CONFIG_MTD_CMDLINE_PARTS=y
 | 
			
		||||
CONFIG_N516_LPC=y
 | 
			
		||||
CONFIG_NEW_LEDS=y
 | 
			
		||||
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
 | 
			
		||||
# CONFIG_REGULATOR_LP3971 is not set
 | 
			
		||||
# CONFIG_REGULATOR_MAX1586 is not set
 | 
			
		||||
# CONFIG_REGULATOR_TPS65023 is not set
 | 
			
		||||
# CONFIG_REGULATOR_TPS6507X is not set
 | 
			
		||||
CONFIG_SENSORS_LM75=y
 | 
			
		||||
# CONFIG_USB_ARCH_HAS_HCD is not set
 | 
			
		||||
# CONFIG_USB_ARCH_HAS_OHCI is not set
 | 
			
		||||
CONFIG_SOC_JZ4740=y
 | 
			
		||||
 | 
			
		||||
@ -1,2 +1,8 @@
 | 
			
		||||
BOARDNAME:=Hanvon N516 e-book reader
 | 
			
		||||
#DEFAULT_PACKAGES += uboot-xburst-n516
 | 
			
		||||
DEFAULT_PACKAGES += \
 | 
			
		||||
	kmod-sound-core \
 | 
			
		||||
	kmod-sound-soc-core \
 | 
			
		||||
	kmod-sound-soc-jz4740 \
 | 
			
		||||
	kmod-sound-soc-jzcodec \
 | 
			
		||||
	kmod-sound-soc-n516 \
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,2 +1,7 @@
 | 
			
		||||
BOARDNAME:=Hanvon N526 e-book reader
 | 
			
		||||
DEFAULT_PACKAGES += uboot-xburst-n526
 | 
			
		||||
DEFAULT_PACKAGES += \
 | 
			
		||||
	kmod-sound-core \
 | 
			
		||||
	kmod-sound-soc-core \
 | 
			
		||||
	kmod-sound-soc-jz4740 \
 | 
			
		||||
	kmod-sound-soc-jzcodec \
 | 
			
		||||
	kmod-sound-soc-n516 \
 | 
			
		||||
 | 
			
		||||
@ -30,29 +30,6 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
 config LASAT
 | 
			
		||||
 	bool "LASAT Networks platforms"
 | 
			
		||||
 	select CEVT_R4K
 | 
			
		||||
@@ -677,6 +680,7 @@ source "arch/mips/alchemy/Kconfig"
 | 
			
		||||
 source "arch/mips/basler/excite/Kconfig"
 | 
			
		||||
 source "arch/mips/bcm63xx/Kconfig"
 | 
			
		||||
 source "arch/mips/jazz/Kconfig"
 | 
			
		||||
+source "arch/mips/jz4740/Kconfig"
 | 
			
		||||
 source "arch/mips/lasat/Kconfig"
 | 
			
		||||
 source "arch/mips/pmc-sierra/Kconfig"
 | 
			
		||||
 source "arch/mips/sgi-ip27/Kconfig"
 | 
			
		||||
@@ -1913,6 +1917,14 @@ config NR_CPUS
 | 
			
		||||
 
 | 
			
		||||
 source "kernel/time/Kconfig"
 | 
			
		||||
 
 | 
			
		||||
+# the value of (max order + 1)
 | 
			
		||||
+config FORCE_MAX_ZONEORDER
 | 
			
		||||
+	prompt "MAX_ZONEORDER"
 | 
			
		||||
+	int
 | 
			
		||||
+	default "12"
 | 
			
		||||
+	help
 | 
			
		||||
+	 The max memory that can be allocated = 4KB * 2^(CONFIG_FORCE_MAX_ZONEORDER - 1)
 | 
			
		||||
+
 | 
			
		||||
 #
 | 
			
		||||
 # Timer Interrupt Frequency Configuration
 | 
			
		||||
 #
 | 
			
		||||
--- a/arch/mips/Makefile
 | 
			
		||||
+++ b/arch/mips/Makefile
 | 
			
		||||
@@ -184,6 +184,14 @@ cflags-$(CONFIG_AR7)		+= -I$(srctree)/ar
 | 
			
		||||
@ -157,7 +134,7 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
+/*
 | 
			
		||||
+ * Valid machtype for group INGENIC
 | 
			
		||||
+ */
 | 
			
		||||
+#define  MACH_INGENIC_JZ4720	0	/* JZ4730 SOC		*/
 | 
			
		||||
+#define  MACH_INGENIC_JZ4730	0	/* JZ4730 SOC		*/
 | 
			
		||||
+#define  MACH_INGENIC_JZ4740	1	/* JZ4740 SOC		*/
 | 
			
		||||
+
 | 
			
		||||
 #define CL_SIZE			COMMAND_LINE_SIZE
 | 
			
		||||
@ -199,17 +176,6 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
 	CPU_LAST
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
--- a/arch/mips/include/asm/mach-generic/irq.h
 | 
			
		||||
+++ b/arch/mips/include/asm/mach-generic/irq.h
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
 #define __ASM_MACH_GENERIC_IRQ_H
 | 
			
		||||
 
 | 
			
		||||
 #ifndef NR_IRQS
 | 
			
		||||
-#define NR_IRQS	128
 | 
			
		||||
+#define NR_IRQS	256
 | 
			
		||||
 #endif
 | 
			
		||||
 
 | 
			
		||||
 #ifdef CONFIG_I8259
 | 
			
		||||
--- a/arch/mips/include/asm/r4kcache.h
 | 
			
		||||
+++ b/arch/mips/include/asm/r4kcache.h
 | 
			
		||||
@@ -17,6 +17,58 @@
 | 
			
		||||
@ -535,18 +501,6 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
+#endif /* CONFIG_JZRISC */
 | 
			
		||||
+
 | 
			
		||||
 #endif /* _ASM_R4KCACHE_H */
 | 
			
		||||
--- a/arch/mips/include/asm/suspend.h
 | 
			
		||||
+++ b/arch/mips/include/asm/suspend.h
 | 
			
		||||
@@ -2,6 +2,9 @@
 | 
			
		||||
 #define __ASM_SUSPEND_H
 | 
			
		||||
 
 | 
			
		||||
 static inline int arch_prepare_suspend(void) { return 0; }
 | 
			
		||||
+#if defined(CONFIG_PM) && defined(CONFIG_JZSOC)
 | 
			
		||||
+extern int jz_pm_init(void);
 | 
			
		||||
+#endif
 | 
			
		||||
 
 | 
			
		||||
 /* References to section boundaries */
 | 
			
		||||
 extern const void __nosave_begin, __nosave_end;
 | 
			
		||||
--- a/arch/mips/kernel/cpu-probe.c
 | 
			
		||||
+++ b/arch/mips/kernel/cpu-probe.c
 | 
			
		||||
@@ -160,6 +160,7 @@ void __init check_wait(void)
 | 
			
		||||
@ -557,7 +511,7 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
 		cpu_wait = r4k_wait;
 | 
			
		||||
 		break;
 | 
			
		||||
 
 | 
			
		||||
@@ -902,6 +903,23 @@ static inline void cpu_probe_cavium(stru
 | 
			
		||||
@@ -902,6 +903,21 @@ static inline void cpu_probe_cavium(stru
 | 
			
		||||
 	}
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
@ -568,8 +522,6 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
+	switch (c->processor_id & 0xff00) {
 | 
			
		||||
+	case PRID_IMP_JZRISC:
 | 
			
		||||
+		c->cputype = CPU_JZRISC;
 | 
			
		||||
+		c->isa_level = MIPS_CPU_ISA_M32R1;
 | 
			
		||||
+		c->tlbsize = 32;
 | 
			
		||||
+		__cpu_name[cpu] = "Ingenic JZRISC";
 | 
			
		||||
+		break;
 | 
			
		||||
+	default:
 | 
			
		||||
@ -591,56 +543,6 @@ Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/001-co
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 	BUG_ON(!__cpu_name[cpu]);
 | 
			
		||||
--- a/arch/mips/mm/c-r4k.c
 | 
			
		||||
+++ b/arch/mips/mm/c-r4k.c
 | 
			
		||||
@@ -928,6 +928,36 @@ static void __cpuinit probe_pcache(void)
 | 
			
		||||
 		c->dcache.waybit = 0;
 | 
			
		||||
 		break;
 | 
			
		||||
 
 | 
			
		||||
+	case CPU_JZRISC:
 | 
			
		||||
+		config1 = read_c0_config1();
 | 
			
		||||
+		config1 = (config1 >> 22) & 0x07;
 | 
			
		||||
+		if (config1 == 0x07)
 | 
			
		||||
+			config1 = 10;
 | 
			
		||||
+		else
 | 
			
		||||
+			config1 = config1 + 11;
 | 
			
		||||
+		config1 += 2;
 | 
			
		||||
+		icache_size = (1 << config1);
 | 
			
		||||
+		c->icache.linesz = 32;
 | 
			
		||||
+		c->icache.ways = 4;
 | 
			
		||||
+		c->icache.waybit = __ffs(icache_size / c->icache.ways);
 | 
			
		||||
+
 | 
			
		||||
+		config1 = read_c0_config1();
 | 
			
		||||
+		config1 = (config1 >> 13) & 0x07;
 | 
			
		||||
+		if (config1 == 0x07)
 | 
			
		||||
+			config1 = 10;
 | 
			
		||||
+		else
 | 
			
		||||
+			config1 = config1 + 11;
 | 
			
		||||
+		config1 += 2;
 | 
			
		||||
+		dcache_size = (1 << config1);
 | 
			
		||||
+		c->dcache.linesz = 32;
 | 
			
		||||
+		c->dcache.ways = 4;
 | 
			
		||||
+		c->dcache.waybit = __ffs(dcache_size / c->dcache.ways);
 | 
			
		||||
+
 | 
			
		||||
+		c->dcache.flags = 0;
 | 
			
		||||
+		c->options |= MIPS_CPU_PREFETCH;
 | 
			
		||||
+
 | 
			
		||||
+		break;
 | 
			
		||||
+
 | 
			
		||||
 	default:
 | 
			
		||||
 		if (!(config & MIPS_CONF_M))
 | 
			
		||||
 			panic("Don't know how to probe P-caches on this cpu.");
 | 
			
		||||
--- a/arch/mips/mm/cache.c
 | 
			
		||||
+++ b/arch/mips/mm/cache.c
 | 
			
		||||
@@ -52,6 +52,8 @@ 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_wback);
 | 
			
		||||
+EXPORT_SYMBOL(_dma_cache_inv);
 | 
			
		||||
 
 | 
			
		||||
 #endif /* CONFIG_DMA_NONCOHERENT */
 | 
			
		||||
 
 | 
			
		||||
--- a/arch/mips/mm/tlbex.c
 | 
			
		||||
+++ b/arch/mips/mm/tlbex.c
 | 
			
		||||
@@ -389,6 +389,11 @@ static void __cpuinit build_tlb_write_en
 | 
			
		||||
 | 
			
		||||
@ -1,2 +1,8 @@
 | 
			
		||||
BOARDNAME:=QI Ben Nanonote (qi_lb60)
 | 
			
		||||
#DEFAULT_PACKAGES += uboot-xburst-qi_lb60
 | 
			
		||||
DEFAULT_PACKAGES += \
 | 
			
		||||
	kmod-sound-core \
 | 
			
		||||
	kmod-sound-soc-core \
 | 
			
		||||
	kmod-sound-soc-jz4740 \
 | 
			
		||||
	kmod-sound-soc-jzcodec \
 | 
			
		||||
	kmod-sound-soc-qi_lb60 \
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user