ixp4xx, cns3xx: backport the latest round of fixes (as of r33684)
authorFelix Fietkau <nbd@openwrt.org>
Wed, 10 Oct 2012 11:43:50 +0000 (11:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 10 Oct 2012 11:43:50 +0000 (11:43 +0000)
SVN-Revision: 33685

package/ixp4xx-microcode/Makefile
package/ixp4xx-microcode/src/IxNpeMicrocode.h
package/kernel/modules/sound.mk
target/linux/cns3xxx/patches-3.3/300-laguna_support.patch
target/linux/generic/patches-3.3/478-mtd-partial_eraseblock_unlock.patch [new file with mode: 0644]
target/linux/ixp4xx/config-3.3

index 9ed9127..52b44f3 100644 (file)
@@ -48,6 +48,7 @@ define Package/ixp4xx-microcode/install
        $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DIR) $(1)/usr/share/doc
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A $(1)/lib/firmware/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A-HSS $(1)/lib/firmware/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/
index ffb22b2..4a843db 100644 (file)
@@ -27,7 +27,7 @@
 #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
-// #define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
+#define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
 // #define IX_NPEDL_NPEIMAGE_NPEA_DMA
 // #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT
 // #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_MPHY_1_PORT
@@ -118,7 +118,11 @@ int main(int argc, char *argv[])
 
                sprintf(filename, "NPE-%c.%08x", (field[0] & 0xf) + 'A',
                        image->id);
-               sprintf(slnk, "NPE-%c", (field[0] & 0xf) + 'A');
+               if (image->id == 0x00090000)
+                       sprintf(slnk, "NPE-%c-HSS", (field[0] & 0xf) + 'A');
+               else
+                       sprintf(slnk, "NPE-%c", (field[0] & 0xf) + 'A');
+
                printf("Writing image: %s.NPE_%c Func: %2x Rev: %02x.%02x "
                        "Size: %5d to: '%s'\n",
                        names[field[0] >> 4], (field[0] & 0xf) + 'A',
index f054d87..4ccdc8b 100644 (file)
@@ -182,3 +182,22 @@ define KernelPackage/sound-soc-ac97
 endef
 
 $(eval $(call KernelPackage,sound-soc-ac97))
+
+
+define KernelPackage/sound-soc-gw_avila
+  TITLE:=Gateworks Avila SoC sound support
+  KCONFIG:= \
+       CONFIG_SND_GW_AVILA_SOC \
+       CONFIG_SND_GW_AVILA_SOC_PCM \
+       CONFIG_SND_GW_AVILA_SOC_HSS
+  FILES:= \
+       $(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
+       $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila.ko \
+       $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-pcm.ko \
+       $(LINUX_DIR)/sound/soc/gw-avila/snd-soc-gw-avila-hss.ko
+  AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-gw-avila snd-soc-gw-avila-pcm snd-soc-gw-avila-hss)
+  DEPENDS:=@TARGET_ixp4xx +kmod-sound-soc-core
+  $(call AddDepends/sound)
+endef
+
+$(eval $(call KernelPackage,sound-soc-gw_avila))
index 7fe970a..b42606b 100644 (file)
 +
 +static struct resource laguna_watchdog_resources[] = {
 +      [0] = {
-+              .start  = CNS3XXX_TC11MP_TWD_BASE,
++              .start  = CNS3XXX_TC11MP_TWD_BASE + 0x100, // CPU0 watchdog
 +              .end    = CNS3XXX_TC11MP_TWD_BASE + SZ_4K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
  obj-$(CONFIG_SMP)                     += platsmp.o headsmp.o
  obj-$(CONFIG_HOTPLUG_CPU)             += hotplug.o
  obj-$(CONFIG_LOCAL_TIMERS)            += localtimer.o
+--- a/arch/arm/mach-cns3xxx/devices.c
++++ b/arch/arm/mach-cns3xxx/devices.c
+@@ -19,6 +19,7 @@
+ #include <mach/cns3xxx.h>
+ #include <mach/irqs.h>
+ #include <mach/pm.h>
++#include <asm/mach-types.h>
+ #include "core.h"
+ #include "devices.h"
+@@ -102,7 +103,11 @@ void __init cns3xxx_sdhci_init(void)
+       u32 gpioa_pins = __raw_readl(gpioa);
+       /* MMC/SD pins share with GPIOA */
+-      gpioa_pins |= 0x1fff0004;
++      if (machine_is_gw2388()) {
++              gpioa_pins |= 0x1fff0000;
++      } else {
++              gpioa_pins |= 0x1fff0004;
++      }
+       __raw_writel(gpioa_pins, gpioa);
+       cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
diff --git a/target/linux/generic/patches-3.3/478-mtd-partial_eraseblock_unlock.patch b/target/linux/generic/patches-3.3/478-mtd-partial_eraseblock_unlock.patch
new file mode 100644 (file)
index 0000000..de4481a
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -356,7 +356,14 @@ static int part_unlock(struct mtd_info *
+       struct mtd_part *part = PART(mtd);
+       if ((len + ofs) > mtd->size)
+               return -EINVAL;
+-      return mtd_unlock(part->master, ofs + part->offset, len);
++
++      ofs += part->offset;
++      if (mtd->flags & MTD_ERASE_PARTIAL) {
++              /* round up len to next erasesize and round down offset to prev block */
++              len = (mtd_div_by_eb(len, part->master) + 1) * part->master->erasesize;
++              ofs &= ~(part->master->erasesize - 1);
++      }
++      return mtd_unlock(part->master, ofs, len);
+ }
+ static int part_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
index 3d90775..54a0ebb 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_BCMA_POSSIBLE=y
 CONFIG_BOUNCE=y
 # CONFIG_CACHE_L2X0 is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
 CONFIG_CMDLINE_FROM_BOOTLOADER=y