summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-11-11 15:31:02 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-11-11 15:31:02 +0000
commit53933a30544a77e3dd40a62ef810a6d37c275f68 (patch)
treee7d105fe0d30bfc54b65f063f3d18e48ee1a0eae
parent9641598e03d1e440ddd4de61fe32c584fbcece59 (diff)
nas100d-kernel: Added 60-nas100d-ide.patch from azummo
-rw-r--r--packages/linux/nas100d-kernel.inc6
-rw-r--r--packages/linux/nas100d-kernel/2.6.14/60-nas100d-ide.patch117
-rw-r--r--packages/linux/nas100d-kernel_2.6.14.bb3
3 files changed, 122 insertions, 4 deletions
diff --git a/packages/linux/nas100d-kernel.inc b/packages/linux/nas100d-kernel.inc
index bf2de136e8..c9301816af 100644
--- a/packages/linux/nas100d-kernel.inc
+++ b/packages/linux/nas100d-kernel.inc
@@ -169,10 +169,10 @@ KERNEL_IMAGETYPE = "zImage"
# To specify the console set KERNEL_CONSOLE in the .bb file.
# CMDLINE_ROOT contains the boot options, CMDLINE_KERNEL_OPTIONS
# contains the things for a specific kernel.
-CMDLINE_KERNEL_OPTIONS ?= "reboot=s"
-CMDLINE_ROOT ?= "root=/dev/ram0 mem=64M@0x00000000 init=/linuxrc"
+CMDLINE_KERNEL_OPTIONS ?=
+CMDLINE_ROOT ?= "root=/dev/mtdblock3 rw rootfstype=jffs2 mem=64M@0x00000000 init=/linuxrc"
# Add distro specific debug (or non-debug) options to this
-CMDLINE_DEBUG ?= ""
+CMDLINE_DEBUG ?= "noirqdebug"
CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_KERNEL_OPTIONS} ${CMDLINE_DEBUG} ${CMDLINE_CONSOLE}"
# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
diff --git a/packages/linux/nas100d-kernel/2.6.14/60-nas100d-ide.patch b/packages/linux/nas100d-kernel/2.6.14/60-nas100d-ide.patch
new file mode 100644
index 0000000000..7928266b32
--- /dev/null
+++ b/packages/linux/nas100d-kernel/2.6.14/60-nas100d-ide.patch
@@ -0,0 +1,117 @@
+ drivers/ide/pci/aec62xx.c | 36 +++++++++++++++++++++++++++++++++---
+ drivers/ide/setup-pci.c | 9 ++++++++-
+ 2 files changed, 41 insertions(+), 4 deletions(-)
+
+--- linux-2.6.14.orig/drivers/ide/pci/aec62xx.c 2005-11-12 15:31:31.000000000 +0100
++++ linux-2.6.14/drivers/ide/pci/aec62xx.c 2005-11-12 15:32:57.000000000 +0100
+@@ -143,7 +143,13 @@ static int aec6210_tune_chipset (ide_dri
+ u8 ultra = 0, ultra_conf = 0;
+ u8 tmp0 = 0, tmp1 = 0, tmp2 = 0;
+ unsigned long flags;
+-
++#ifdef CONFIG_MACH_NAS100D
++ byte reg4ah;
++ pci_write_config_byte(hwif->pci_dev, PCI_LATENCY_TIMER, 0x90);
++ /* Enable burst mode & force 2 ports enable */
++ pci_read_config_byte(hwif->pci_dev, 0x4a, &reg4ah);
++ pci_write_config_byte(hwif->pci_dev, 0x4a, reg4ah | 0x80);
++#endif
+ local_irq_save(flags);
+ /* 0x40|(2*drive->dn): Active, 0x41|(2*drive->dn): Recovery */
+ pci_read_config_word(dev, 0x40|(2*drive->dn), &d_conf);
+@@ -263,7 +269,7 @@ static int aec62xx_irq_timeout (ide_driv
+ case PCI_DEVICE_ID_ARTOP_ATP865:
+ case PCI_DEVICE_ID_ARTOP_ATP865R:
+ printk(" AEC62XX time out ");
+-#if 0
++#ifdef CONFIG_MACH_NAS100D
+ {
+ int i = 0;
+ u8 reg49h = 0;
+@@ -277,7 +283,7 @@ static int aec62xx_irq_timeout (ide_driv
+ default:
+ break;
+ }
+-#if 0
++#ifdef CONFIG_MACH_NAS100D
+ {
+ ide_hwif_t *hwif = HWIF(drive);
+ struct pci_dev *dev = hwif->pci_dev;
+@@ -299,6 +305,13 @@ static unsigned int __devinit init_chips
+ {
+ int bus_speed = system_bus_clock();
+
++#ifdef CONFIG_MACH_NAS100D
++ /* enable both ports */
++ byte tmp;
++ pci_read_config_byte(dev, 0x4a, &tmp);
++ pci_write_config_byte(dev, 0x4a, tmp | 0x06);
++#endif
++
+ if (dev->resource[PCI_ROM_RESOURCE].start) {
+ pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
+ printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
+@@ -312,11 +325,22 @@ static unsigned int __devinit init_chips
+ return dev->irq;
+ }
+
++#ifdef CONFIG_MACH_NAS100D
++void nas100d_outw(u16 addr, unsigned long port)
++{
++ outsw(port, &addr, 1);
++}
++#endif
++
+ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
+ {
+ hwif->autodma = 0;
+ hwif->tuneproc = &aec62xx_tune_drive;
+ hwif->speedproc = &aec62xx_tune_chipset;
++#ifdef CONFIG_MACH_NAS100D
++ printk(KERN_INFO "aec62xx: nas100d workaround\n");
++ hwif->OUTW = nas100d_outw;
++#endif
+
+ if (hwif->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) {
+ hwif->serialized = hwif->channel;
+@@ -408,6 +432,9 @@ static ide_pci_device_t aec62xx_chipsets
+ .init_dma = init_dma_aec62xx,
+ .channels = 2,
+ .autodma = NOAUTODMA,
++#ifdef CONFIG_MACH_NAS100D
++ .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
++#endif
+ .bootable = OFF_BOARD,
+ },{ /* 2 */
+ .name = "AEC6260R",
+@@ -427,6 +454,9 @@ static ide_pci_device_t aec62xx_chipsets
+ .init_dma = init_dma_aec62xx,
+ .channels = 2,
+ .autodma = AUTODMA,
++#ifdef CONFIG_MACH_NAS100D
++ .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
++#endif
+ .bootable = OFF_BOARD,
+ },{ /* 4 */
+ .name = "AEC6X80R",
+--- linux-2.6.14.orig/drivers/ide/setup-pci.c 2005-11-12 14:33:27.000000000 +0100
++++ linux-2.6.14/drivers/ide/setup-pci.c 2005-11-12 15:32:57.000000000 +0100
+@@ -602,10 +602,17 @@ void ide_pci_setup_ports(struct pci_dev
+ if ((d->flags & IDEPCI_FLAG_FORCE_PDC) &&
+ (secondpdc++==1) && (port==1))
+ goto controller_ok;
+-
++
++#ifdef CONFIG_MACH_NAS100D
++// XXX ????
++ pci_read_config_byte(dev, e->reg, &tmp);
++ pci_write_config_byte(dev, e->reg, tmp & ~0x01);
++#endif
+ if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
+ (tmp & e->mask) != e->val))
+ continue; /* port not enabled */
++
++
+ controller_ok:
+
+ if (d->channels <= port)
diff --git a/packages/linux/nas100d-kernel_2.6.14.bb b/packages/linux/nas100d-kernel_2.6.14.bb
index 98f2bc15ed..6b44b0da2d 100644
--- a/packages/linux/nas100d-kernel_2.6.14.bb
+++ b/packages/linux/nas100d-kernel_2.6.14.bb
@@ -26,6 +26,7 @@ N1K_PATCHES = "\
file://28-spinlock-up.patch;patch=1 \
file://29-ipv4-route-c-spinlock.patch;patch=1 \
file://50-nas100d-arch.patch;patch=1 \
+ file://60-nas100d-ide.patch;patch=1 \
file://90-ixp4xx-pci-le.patch;patch=1 \
"
@@ -35,4 +36,4 @@ include nas100d-kernel.inc
# specific to the bootstrap of *this* kernel in here - DISTRO specfic
# config must be in CMDLINE_ROOT (see the full definition of CMDLINE
# in nas100d-kernel.inc)
-CMDLINE_KERNEL_OPTIONS = "x1205.hctosys=1"
+# CMDLINE_KERNEL_OPTIONS = "x1205.hctosys=1"