* [PATCH] remove dead drivers/ide/ppc/swarm.c
@ 2004-05-03 23:34 Bartlomiej Zolnierkiewicz
2004-05-04 11:19 ` Ralf Baechle
0 siblings, 1 reply; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-03 23:34 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
This driver was merged in 2.5.32 but depends on <asm/sibyte/swarm_ide.h>
which hasn't been merged in 2.5. Additionally it is a MIPS specific driver
so it should be in drivers/ide/mips/ if somebody ever decides to re-add it.
linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Kconfig | 4
linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Makefile | 1
linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/ide.c | 6 -
linux-2.6.6-rc3-bk2/drivers/ide/ppc/swarm.c | 101 ----------------------
4 files changed, 112 deletions(-)
diff -puN drivers/ide/ide.c~ide_swarm drivers/ide/ide.c
--- linux-2.6.6-rc3-bk2/drivers/ide/ide.c~ide_swarm 2004-05-04 01:32:48.841860272 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/ide.c 2004-05-04 01:32:48.861857232 +0200
@@ -2090,12 +2090,6 @@ static void __init probe_for_hwifs (void
pmac_ide_probe();
}
#endif /* CONFIG_BLK_DEV_IDE_PMAC */
-#ifdef CONFIG_BLK_DEV_IDE_SWARM
- {
- extern void swarm_ide_probe(void);
- swarm_ide_probe();
- }
-#endif /* CONFIG_BLK_DEV_IDE_SWARM */
#ifdef CONFIG_BLK_DEV_GAYLE
{
extern void gayle_init(void);
diff -puN drivers/ide/Kconfig~ide_swarm drivers/ide/Kconfig
--- linux-2.6.6-rc3-bk2/drivers/ide/Kconfig~ide_swarm 2004-05-04 01:32:48.848859208 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Kconfig 2004-05-04 01:32:48.863856928 +0200
@@ -851,10 +851,6 @@ config BLK_DEV_IDEDMA_PMAC_AUTO
hardware may have caused damage. Saying Y should be safe on all
Apple machines.
-config BLK_DEV_IDE_SWARM
- bool "SWARM onboard IDE support"
- depends on SIBYTE_SWARM
-
config BLK_DEV_IDE_ICSIDE
tristate "ICS IDE interface support"
depends on ARM && ARCH_ACORN
diff -puN drivers/ide/Makefile~ide_swarm drivers/ide/Makefile
--- linux-2.6.6-rc3-bk2/drivers/ide/Makefile~ide_swarm 2004-05-04 01:32:48.853858448 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Makefile 2004-05-04 01:32:48.864856776 +0200
@@ -36,7 +36,6 @@ ide-core-$(CONFIG_BLK_DEV_Q40IDE) += leg
# built-in only drivers from ppc/
ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE) += ppc/mpc8xx.o
ide-core-$(CONFIG_BLK_DEV_IDE_PMAC) += ppc/pmac.o
-ide-core-$(CONFIG_BLK_DEV_IDE_SWARM) += ppc/swarm.o
obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o
obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
diff -puN -L drivers/ide/ppc/swarm.c drivers/ide/ppc/swarm.c~ide_swarm /dev/null
--- linux-2.6.6-rc3-bk2/drivers/ide/ppc/swarm.c
+++ /dev/null 2004-01-17 00:25:55.000000000 +0100
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2001 Broadcom Corporation
- *
- * 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.
- *
- * 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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/* Derived loosely from ide-pmac.c, so:
- *
- * Copyright (C) 1998 Paul Mackerras.
- * Copyright (C) 1995-1998 Mark Lord
- */
-#include <linux/config.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/ide.h>
-#include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/sibyte/sb1250_int.h>
-
-#define __IDE_SWARM_C
-
-#include <asm/sibyte/swarm_ide.h>
-
-void __init swarm_ide_probe(void)
-{
- int i;
- ide_hwif_t *hwif;
- /*
- * Find the first untaken slot in hwifs
- */
- for (i = 0; i < MAX_HWIFS; i++) {
- if (!ide_hwifs[i].io_ports[IDE_DATA_OFFSET]) {
- break;
- }
- }
- if (i == MAX_HWIFS) {
- printk("No space for SWARM onboard IDE driver in ide_hwifs[]. Not enabled.\n");
- return;
- }
-
- /* Set up our stuff */
- hwif = &ide_hwifs[i];
- hwif->hw.io_ports[IDE_DATA_OFFSET] = SWARM_IDE_REG(0x1f0);
- hwif->hw.io_ports[IDE_ERROR_OFFSET] = SWARM_IDE_REG(0x1f1);
- hwif->hw.io_ports[IDE_NSECTOR_OFFSET] = SWARM_IDE_REG(0x1f2);
- hwif->hw.io_ports[IDE_SECTOR_OFFSET] = SWARM_IDE_REG(0x1f3);
- hwif->hw.io_ports[IDE_LCYL_OFFSET] = SWARM_IDE_REG(0x1f4);
- hwif->hw.io_ports[IDE_HCYL_OFFSET] = SWARM_IDE_REG(0x1f5);
- hwif->hw.io_ports[IDE_SELECT_OFFSET] = SWARM_IDE_REG(0x1f6);
- hwif->hw.io_ports[IDE_STATUS_OFFSET] = SWARM_IDE_REG(0x1f7);
- hwif->hw.io_ports[IDE_CONTROL_OFFSET] = SWARM_IDE_REG(0x3f6);
- hwif->hw.io_ports[IDE_IRQ_OFFSET] = SWARM_IDE_REG(0x3f7);
-// hwif->hw->ack_intr = swarm_ide_ack_intr;
- hwif->hw.irq = SWARM_IDE_INT;
-#if 0
- hwif->iops = swarm_iops;
-#else
- hwif->OUTB = hwif->OUTBP = swarm_outb;
- hwif->OUTW = hwif->OUTWP = swarm_outw;
- hwif->OUTL = hwif->OUTLP = swarm_outl;
- hwif->OUTSW = hwif->OUTSWP = swarm_outsw;
- hwif->OUTSL = hwif->OUTSLP = swarm_outsl;
- hwif->INB = hwif->INBP = swarm_inb;
- hwif->INW = hwif->INWP = swarm_inw;
- hwif->INL = hwif->INLP = swarm_inl;
- hwif->INSW = hwif->INSWP = swarm_insw;
- hwif->INSL = hwif->INSLP = swarm_insl;
-#endif
-#if 0
- hwif->pioops = swarm_pio_ops;
-#else
- hwif->ata_input_data = swarm_ata_input_data;
- hwif->ata_output_data = swarm_ata_output_data;
- hwif->atapi_input_bytes = swarm_atapi_input_bytes;
- hwif->atapi_output_bytes = swarm_atapi_output_bytes;
-#endif
- memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
- hwif->irq = hwif->hw.irq;
- printk("SWARM onboard IDE configured as device %i\n", i);
-
-#ifndef HWIF_PROBE_CLASSIC_METHOD
- probe_hwif_init(hwif->index);
-#endif /* HWIF_PROBE_CLASSIC_METHOD */
-
-}
-
_
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-03 23:34 [PATCH] remove dead drivers/ide/ppc/swarm.c Bartlomiej Zolnierkiewicz
@ 2004-05-04 11:19 ` Ralf Baechle
2004-05-04 12:28 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 11+ messages in thread
From: Ralf Baechle @ 2004-05-04 11:19 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel, macro
On Tue, May 04, 2004 at 01:34:22AM +0200, Bartlomiej Zolnierkiewicz wrote:
> This driver was merged in 2.5.32 but depends on <asm/sibyte/swarm_ide.h>
> which hasn't been merged in 2.5. Additionally it is a MIPS specific driver
> so it should be in drivers/ide/mips/ if somebody ever decides to re-add it.
No. I've already sent a proper patch instead of just a chainsaw massacre
to akpm.
Ralf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 11:19 ` Ralf Baechle
@ 2004-05-04 12:28 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:42 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:43 ` Ralf Baechle
0 siblings, 2 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-04 12:28 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-ide, linux-kernel, macro
Hi Ralf,
On Tuesday 04 of May 2004 13:19, Ralf Baechle wrote:
> On Tue, May 04, 2004 at 01:34:22AM +0200, Bartlomiej Zolnierkiewicz wrote:
> > This driver was merged in 2.5.32 but depends on <asm/sibyte/swarm_ide.h>
> > which hasn't been merged in 2.5. Additionally it is a MIPS specific
> > driver so it should be in drivers/ide/mips/ if somebody ever decides to
> > re-add it.
>
> No. I've already sent a proper patch instead of just a chainsaw massacre
> to akpm.
It is not integrated into -mm (2.6.6-rc3-mm1) yet so I couldn't see it.
[ Please cc: me on IDE patches. ]
If it looks the same as in linux-mips CVS it won't work because I've killed
ide_init_default_hwifs() recently (except ARM but patch is pending).
Sorry, this is what you get when using hacks. 8)
While at swarm.c ...
> * Boards with SiByte processors so far have supported IDE devices via
> * the Generic Bus, PCI bus, and built-in PCMCIA interface. In all
> * cases, byte-swapping must be avoided for these devices (whereas
> * other PCI devices, for example, will require swapping).
Why does byte-swapping must be avoided for PCI IDE
but not for other PCI devices?
Cheers,
Bartlomiej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 12:28 ` Bartlomiej Zolnierkiewicz
@ 2004-05-04 12:42 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:43 ` Ralf Baechle
1 sibling, 0 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-04 12:42 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-ide, linux-kernel, macro
On Tuesday 04 of May 2004 14:28, Bartlomiej Zolnierkiewicz wrote:
> Hi Ralf,
>
> On Tuesday 04 of May 2004 13:19, Ralf Baechle wrote:
> > On Tue, May 04, 2004 at 01:34:22AM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > This driver was merged in 2.5.32 but depends on
> > > <asm/sibyte/swarm_ide.h> which hasn't been merged in 2.5. Additionally
> > > it is a MIPS specific driver so it should be in drivers/ide/mips/ if
> > > somebody ever decides to re-add it.
> >
> > No. I've already sent a proper patch instead of just a chainsaw massacre
> > to akpm.
>
> It is not integrated into -mm (2.6.6-rc3-mm1) yet so I couldn't see it.
> [ Please cc: me on IDE patches. ]
>
> If it looks the same as in linux-mips CVS it won't work because I've killed
> ide_init_default_hwifs() recently (except ARM but patch is pending).
>
> Sorry, this is what you get when using hacks. 8)
Actually SiByte IDE seems to be broken even in linux-mips CVS since
at least 5 months due to this change:
http://www.linux-mips.org/cvsweb/linux/include/asm-mips/ide.h.diff?r1=1.23&r2=1.24
which causes conflicts between swarm.c private ide_init_default_hwifs() hack
and the one from <asm/mach-generic/ide.h> (I can't find other ide.h).
Bartlomiej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 12:28 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:42 ` Bartlomiej Zolnierkiewicz
@ 2004-05-04 12:43 ` Ralf Baechle
2004-05-04 13:10 ` Bartlomiej Zolnierkiewicz
2004-05-04 14:21 ` Maciej W. Rozycki
1 sibling, 2 replies; 11+ messages in thread
From: Ralf Baechle @ 2004-05-04 12:43 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel, macro
On Tue, May 04, 2004 at 02:28:50PM +0200, Bartlomiej Zolnierkiewicz wrote:
> It is not integrated into -mm (2.6.6-rc3-mm1) yet so I couldn't see it.
> [ Please cc: me on IDE patches. ]
Will do.
> If it looks the same as in linux-mips CVS it won't work because I've killed
> ide_init_default_hwifs() recently (except ARM but patch is pending).
>
> Sorry, this is what you get when using hacks. 8)
>
> While at swarm.c ...
>
> > * Boards with SiByte processors so far have supported IDE devices via
> > * the Generic Bus, PCI bus, and built-in PCMCIA interface. In all
> > * cases, byte-swapping must be avoided for these devices (whereas
> > * other PCI devices, for example, will require swapping).
>
> Why does byte-swapping must be avoided for PCI IDE
> but not for other PCI devices?
Simply a result of the way the IDE bus is hooked up to the generic bus of
the Sibyte chip. I'd have to research details if you're interested ...
Ralf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 12:43 ` Ralf Baechle
@ 2004-05-04 13:10 ` Bartlomiej Zolnierkiewicz
2004-05-04 14:27 ` Maciej W. Rozycki
2004-05-04 14:21 ` Maciej W. Rozycki
1 sibling, 1 reply; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-04 13:10 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-ide, linux-kernel, macro
On Tuesday 04 of May 2004 14:43, Ralf Baechle wrote:
> On Tue, May 04, 2004 at 02:28:50PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > It is not integrated into -mm (2.6.6-rc3-mm1) yet so I couldn't see it.
> > [ Please cc: me on IDE patches. ]
>
> Will do.
Thanks.
> > If it looks the same as in linux-mips CVS it won't work because I've
> > killed ide_init_default_hwifs() recently (except ARM but patch is
> > pending).
> >
> > Sorry, this is what you get when using hacks. 8)
> >
> > While at swarm.c ...
> >
> > > * Boards with SiByte processors so far have supported IDE devices via
> > > * the Generic Bus, PCI bus, and built-in PCMCIA interface. In all
> > > * cases, byte-swapping must be avoided for these devices (whereas
> > > * other PCI devices, for example, will require swapping).
> >
> > Why does byte-swapping must be avoided for PCI IDE
> > but not for other PCI devices?
>
> Simply a result of the way the IDE bus is hooked up to the generic bus of
> the Sibyte chip. I'd have to research details if you're interested ...
The basic question is whether disk used on SiByte can be read i.e. on x86.
If not than we may have serious problems with some special commands with
current implementation (similar problem as on Atari Q40/Q60).
Bartlomiej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 13:10 ` Bartlomiej Zolnierkiewicz
@ 2004-05-04 14:27 ` Maciej W. Rozycki
2004-05-05 15:36 ` Maciej W. Rozycki
0 siblings, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2004-05-04 14:27 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Ralf Baechle, linux-ide, linux-kernel
On Tue, 4 May 2004, Bartlomiej Zolnierkiewicz wrote:
> > Simply a result of the way the IDE bus is hooked up to the generic bus of
> > the Sibyte chip. I'd have to research details if you're interested ...
>
> The basic question is whether disk used on SiByte can be read i.e. on x86.
> If not than we may have serious problems with some special commands with
> current implementation (similar problem as on Atari Q40/Q60).
I can check the GPIO attachment with 2.4 (which should behave the same
way here). I don't have a PCI IDE board.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 14:27 ` Maciej W. Rozycki
@ 2004-05-05 15:36 ` Maciej W. Rozycki
2004-05-05 17:34 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2004-05-05 15:36 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Ralf Baechle, linux-ide, linux-kernel
On Tue, 4 May 2004, Maciej W. Rozycki wrote:
> > The basic question is whether disk used on SiByte can be read i.e. on x86.
> > If not than we may have serious problems with some special commands with
> > current implementation (similar problem as on Atari Q40/Q60).
>
> I can check the GPIO attachment with 2.4 (which should behave the same
> way here). I don't have a PCI IDE board.
Here is the result:
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SiByte onboard IDE configured as device 0
hda: ST310211A, ATA DISK drive
ide0 at 0xffffffff340b3e00-0xffffffff340b3e07,0xffffffff340b7ec0 on irq 36
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 19541088 sectors (10005 MB) w/1024KiB Cache, CHS=19386/16/63
Partition check:
hda:
[...]
# dd if=/dev/hda bs=512 count=1 2>/dev/null | od -Ax -tx1
000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
000200
so barring the completely bogus addresses reported (the interface is
decoded at 0x100b0000 and that's MMIO, unrelated to the PCI I/O space -- I
guess fixing it would require a significant update to ide-probe.c and
elsewhere), it looks OK. This is in a little-endian configuration -- I'll
recheck for big endianness once I have appropriate userland installed
(which is likely not very soon). It shouldn't matter much, though -- I've
checked documentation and I've found out that while the generic bus (the
IDE connector is wired to) is big-endian externally, the internal logic
does swapping if the system is configured for little-endian operation.
FYI, the interface is currently fixed at PIO3, but perhaps it could get
improved to handle other speeds. Bus-master DMA is unsupported, but
perhaps one of the data movers could get engaged for a third-party DMA
support. The generic bus is clocked at 100MHz, so faster operation is
possible, at least in theory.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-05 15:36 ` Maciej W. Rozycki
@ 2004-05-05 17:34 ` Bartlomiej Zolnierkiewicz
2004-05-05 19:05 ` Maciej W. Rozycki
0 siblings, 1 reply; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-05 17:34 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Ralf Baechle, linux-ide, linux-kernel
On Wednesday 05 of May 2004 17:36, Maciej W. Rozycki wrote:
> On Tue, 4 May 2004, Maciej W. Rozycki wrote:
> > > The basic question is whether disk used on SiByte can be read i.e. on
> > > x86. If not than we may have serious problems with some special
> > > commands with current implementation (similar problem as on Atari
> > > Q40/Q60).
> >
> > I can check the GPIO attachment with 2.4 (which should behave the same
> > way here). I don't have a PCI IDE board.
>
> Here is the result:
>
> Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> SiByte onboard IDE configured as device 0
> hda: ST310211A, ATA DISK drive
> ide0 at 0xffffffff340b3e00-0xffffffff340b3e07,0xffffffff340b7ec0 on irq 36
> hda: attached ide-disk driver.
> hda: host protected area => 1
> hda: 19541088 sectors (10005 MB) w/1024KiB Cache, CHS=19386/16/63
> Partition check:
> hda:
> [...]
> # dd if=/dev/hda bs=512 count=1 2>/dev/null | od -Ax -tx1
> 000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> *
> 0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
> 000200
>
> so barring the completely bogus addresses reported (the interface is
> decoded at 0x100b0000 and that's MMIO, unrelated to the PCI I/O space -- I
> guess fixing it would require a significant update to ide-probe.c and
> elsewhere), it looks OK. This is in a little-endian configuration -- I'll
I suppose these are the addresses after ioremap() so no problem here.
> recheck for big endianness once I have appropriate userland installed
> (which is likely not very soon). It shouldn't matter much, though -- I've
> checked documentation and I've found out that while the generic bus (the
> IDE connector is wired to) is big-endian externally, the internal logic
> does swapping if the system is configured for little-endian operation.
IDE bus must be always LE independently of system being LE or BE.
If system is LE this is OK as the internal logic does swapping but in case
when system is BE swapping is also needed.
> FYI, the interface is currently fixed at PIO3, but perhaps it could get
> improved to handle other speeds. Bus-master DMA is unsupported, but
> perhaps one of the data movers could get engaged for a third-party DMA
> support. The generic bus is clocked at 100MHz, so faster operation is
> possible, at least in theory.
:-)
Thanks,
Bartlomiej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-05 17:34 ` Bartlomiej Zolnierkiewicz
@ 2004-05-05 19:05 ` Maciej W. Rozycki
0 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2004-05-05 19:05 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Ralf Baechle, linux-ide, linux-kernel
On Wed, 5 May 2004, Bartlomiej Zolnierkiewicz wrote:
> > so barring the completely bogus addresses reported (the interface is
> > decoded at 0x100b0000 and that's MMIO, unrelated to the PCI I/O space -- I
> > guess fixing it would require a significant update to ide-probe.c and
> > elsewhere), it looks OK. This is in a little-endian configuration -- I'll
>
> I suppose these are the addresses after ioremap() so no problem here.
Not even that -- the exact calculation leading to the base address
reported is:
ioremap_nocache(0x100b0000) - ioremap(0xdc000000) + (0x1f0 << 5)
and is really a workaround for no better way of expressing an address of
an MMIO IDE interface (0xdc000000 is the base address of the PCI I/O
space, unswapped). I see no reason to use virtual addresses for report
here.
> > recheck for big endianness once I have appropriate userland installed
> > (which is likely not very soon). It shouldn't matter much, though -- I've
> > checked documentation and I've found out that while the generic bus (the
> > IDE connector is wired to) is big-endian externally, the internal logic
> > does swapping if the system is configured for little-endian operation.
>
> IDE bus must be always LE independently of system being LE or BE.
>
> If system is LE this is OK as the internal logic does swapping but in case
> when system is BE swapping is also needed.
Well, I suppose they have simply swapped bytes at the connector. ;-)
This is a guess, though, as I lack docs in this area. The important bit
is the endiannes of the generic bus used here never changes.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
2004-05-04 12:43 ` Ralf Baechle
2004-05-04 13:10 ` Bartlomiej Zolnierkiewicz
@ 2004-05-04 14:21 ` Maciej W. Rozycki
1 sibling, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2004-05-04 14:21 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel
On Tue, 4 May 2004, Ralf Baechle wrote:
> > While at swarm.c ...
> >
> > > * Boards with SiByte processors so far have supported IDE devices via
> > > * the Generic Bus, PCI bus, and built-in PCMCIA interface. In all
> > > * cases, byte-swapping must be avoided for these devices (whereas
> > > * other PCI devices, for example, will require swapping).
> >
> > Why does byte-swapping must be avoided for PCI IDE
> > but not for other PCI devices?
>
> Simply a result of the way the IDE bus is hooked up to the generic bus of
> the Sibyte chip. I'd have to research details if you're interested ...
I suppose the comment is incorrect, at least for the PCI bus (the two
other kinds of attachments use GPIO, so they may well be
endian-independent). The PCI and HT I/O space accesses are done via the
non-swapping address space, so data will appear as swapped in the
big-endian configuration of the system.
I had a brief discussion on the hack last Summer with the author of the
code, but had no time to dig more deeply into it. Now the author is gone,
but I'll have a look at it. Don't hold your breath, though.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-05-05 19:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-03 23:34 [PATCH] remove dead drivers/ide/ppc/swarm.c Bartlomiej Zolnierkiewicz
2004-05-04 11:19 ` Ralf Baechle
2004-05-04 12:28 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:42 ` Bartlomiej Zolnierkiewicz
2004-05-04 12:43 ` Ralf Baechle
2004-05-04 13:10 ` Bartlomiej Zolnierkiewicz
2004-05-04 14:27 ` Maciej W. Rozycki
2004-05-05 15:36 ` Maciej W. Rozycki
2004-05-05 17:34 ` Bartlomiej Zolnierkiewicz
2004-05-05 19:05 ` Maciej W. Rozycki
2004-05-04 14:21 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.