* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems [not found] ` <c8485d470904150734s47ce0f27y3ae984355e823d9f@mail.gmail.com> @ 2009-04-16 19:30 ` Bartlomiej Zolnierkiewicz 2009-04-16 20:16 ` Grant Likely ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2009-04-16 19:30 UTC (permalink / raw) To: Roderick Colenbrander; +Cc: linux-ide, linuxppc-dev Hi, On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: > Hi, > > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge > for IDE, USB and Audio. I did a lot of work to get the pci bus working > on this board and it works correctly but the default init code > of the alim15x3 driver doesn't work for me. The driver explicitly > disabled some initialization code for powerpc after uncommenting this > code it works properly. Benjamin Herrenschmidt and I think this > !CONFIG_PPC check should be removed because the system behaves > like a real 'x86' system (also the i8259 interrupt controller is used). Ben, I guess you are OK with the change and there are no longer other platforms requiring CONFIG_PPC check below? [I don't see your ACK here] > Regards, > Roderick Colenbrander > > > From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 > From: Roderick Colenbrander <thunderbird2k@gmail.com> > Date: Wed, 15 Apr 2009 10:45:17 +0200 > Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for > x86-like PowerPC boards like Xilinx ML310/410/510. Roderick, please add your "Signed-off-by:" line (per Documentation/SubmittingPatches). Thanks. > --- > drivers/ide/alim15x3.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c > index 537da1c..9176c0f 100644 > --- a/drivers/ide/alim15x3.c > +++ b/drivers/ide/alim15x3.c > @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) > return cbl; > } > > -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) > +#if !defined(CONFIG_SPARC64) > /** > * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff > * @hwif: interface to configure > * > * Obtain the IRQ tables for an ALi based IDE solution on the PC > - * class platforms. This part of the code isn't applicable to the > - * Sparc and PowerPC systems. > + * class platforms. This part of the code isn't applicable to > + * Sparc systems. It is usable on 'x86-like' PowerPC systems > + * which use a Ali M15x3 south bridge like e.g. Xilinx ML310/410/510. > */ > > static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > } > #else > #define init_hwif_ali15x3 NULL > -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ > +#endif /* !defined(CONFIG_SPARC64) */ > > /** > * init_dma_ali15x3 - set up DMA on ALi15x3 > -- > 1.5.6.3 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 19:30 ` RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems Bartlomiej Zolnierkiewicz @ 2009-04-16 20:16 ` Grant Likely 2009-04-16 20:57 ` Anton Vorontsov 2009-04-17 7:40 ` Benjamin Herrenschmidt 2 siblings, 0 replies; 13+ messages in thread From: Grant Likely @ 2009-04-16 20:16 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz, Roderick Colenbrander; +Cc: linux-ide, linuxppc-dev Hi Roderick, Since this patch is Xilinx virtex related, it is a good idea to cc: both the linuxppc-dev mailing list and me when posting. That way I'd have the opportunity to reply with an 'acked-by' or 'reviewed-by' line. g. On Thu, Apr 16, 2009 at 1:30 PM, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote: > > Hi, > > On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: >> Hi, >> >> I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a >> Virtex-5 FPGA. The board also contains a ALI M1533 south bridge >> for IDE, USB and Audio. I did a lot of work to get the pci bus working >> on this board and it works correctly but the default init code >> of the alim15x3 driver doesn't work for me. The driver explicitly >> disabled some initialization code for powerpc after uncommenting this >> code it works properly. Benjamin Herrenschmidt and I think this >> !CONFIG_PPC check should be removed because the system behaves >> like a real 'x86' system (also the i8259 interrupt controller is used). > > Ben, I guess you are OK with the change and there are no longer other > platforms requiring CONFIG_PPC check below? =A0[I don't see your ACK here= ] > >> Regards, >> Roderick Colenbrander >> >> >> From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 >> From: Roderick Colenbrander <thunderbird2k@gmail.com> >> Date: Wed, 15 Apr 2009 10:45:17 +0200 >> Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for >> x86-like PowerPC boards like Xilinx ML310/410/510. > > Roderick, please add your "Signed-off-by:" line > (per Documentation/SubmittingPatches). > > Thanks. > >> --- >> =A0drivers/ide/alim15x3.c | =A0 =A09 +++++---- >> =A01 files changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c >> index 537da1c..9176c0f 100644 >> --- a/drivers/ide/alim15x3.c >> +++ b/drivers/ide/alim15x3.c >> @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) >> =A0 =A0 =A0return cbl; >> =A0} >> >> -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) >> +#if !defined(CONFIG_SPARC64) >> =A0/** >> =A0 * =A0 =A0init_hwif_ali15x3 =A0 =A0- =A0 =A0Initialize the ALI IDE x8= 6 stuff >> =A0 * =A0 =A0@hwif: interface to configure >> =A0 * >> =A0 * =A0 =A0Obtain the IRQ tables for an ALi based IDE solution on the = PC >> - * =A0 =A0class platforms. This part of the code isn't applicable to th= e >> - * =A0 =A0Sparc and PowerPC systems. >> + * =A0 =A0class platforms. This part of the code isn't applicable to >> + * =A0 =A0Sparc systems. It is usable on 'x86-like' PowerPC systems >> + * =A0 =A0 =A0which use a Ali M15x3 south bridge like e.g. Xilinx ML310= /410/510. >> =A0 */ >> >> =A0static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) >> @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t = *hwif) >> =A0} >> =A0#else >> =A0#define init_hwif_ali15x3 NULL >> -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ >> +#endif /* !defined(CONFIG_SPARC64) */ >> >> =A0/** >> =A0 * =A0 =A0init_dma_ali15x3 =A0 =A0- =A0 =A0set up DMA on ALi15x3 >> -- >> 1.5.6.3 > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev > --=20 Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 19:30 ` RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems Bartlomiej Zolnierkiewicz 2009-04-16 20:16 ` Grant Likely @ 2009-04-16 20:57 ` Anton Vorontsov 2009-04-16 21:27 ` Roderick Colenbrander 2009-04-17 7:40 ` Benjamin Herrenschmidt 2 siblings, 1 reply; 13+ messages in thread From: Anton Vorontsov @ 2009-04-16 20:57 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Roderick Colenbrander, linuxppc-dev On Thu, Apr 16, 2009 at 09:30:00PM +0200, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: > > Hi, > > > > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a > > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge > > for IDE, USB and Audio. I did a lot of work to get the pci bus working > > on this board and it works correctly but the default init code > > of the alim15x3 driver doesn't work for me. The driver explicitly > > disabled some initialization code for powerpc after uncommenting this > > code it works properly. Benjamin Herrenschmidt and I think this > > !CONFIG_PPC check should be removed because the system behaves > > like a real 'x86' system (also the i8259 interrupt controller is used). > > Ben, I guess you are OK with the change and there are no longer other > platforms requiring CONFIG_PPC check below? [I don't see your ACK here] I'd like to nak this patch. It'll break MPC8610HPCD boards. See commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 I'm not sure how should we handle this for Xilinx PPC, MPC8610 PPC and Sparc all at the same time, but it's obvious that #ifdef isn't enough any longer... > > Regards, > > Roderick Colenbrander > > > > > > From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 > > From: Roderick Colenbrander <thunderbird2k@gmail.com> > > Date: Wed, 15 Apr 2009 10:45:17 +0200 > > Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for > > x86-like PowerPC boards like Xilinx ML310/410/510. > > Roderick, please add your "Signed-off-by:" line > (per Documentation/SubmittingPatches). > > Thanks. > > > --- > > drivers/ide/alim15x3.c | 9 +++++---- > > 1 files changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c > > index 537da1c..9176c0f 100644 > > --- a/drivers/ide/alim15x3.c > > +++ b/drivers/ide/alim15x3.c > > @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) > > return cbl; > > } > > > > -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) > > +#if !defined(CONFIG_SPARC64) > > /** > > * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff > > * @hwif: interface to configure > > * > > * Obtain the IRQ tables for an ALi based IDE solution on the PC > > - * class platforms. This part of the code isn't applicable to the > > - * Sparc and PowerPC systems. > > + * class platforms. This part of the code isn't applicable to > > + * Sparc systems. It is usable on 'x86-like' PowerPC systems > > + * which use a Ali M15x3 south bridge like e.g. Xilinx ML310/410/510. > > */ > > > > static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > } > > #else > > #define init_hwif_ali15x3 NULL > > -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ > > +#endif /* !defined(CONFIG_SPARC64) */ > > > > /** > > * init_dma_ali15x3 - set up DMA on ALi15x3 > > -- > > 1.5.6.3 -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 20:57 ` Anton Vorontsov @ 2009-04-16 21:27 ` Roderick Colenbrander 2009-04-16 22:04 ` Anton Vorontsov 0 siblings, 1 reply; 13+ messages in thread From: Roderick Colenbrander @ 2009-04-16 21:27 UTC (permalink / raw) To: avorontsov; +Cc: linux-ide, Bartlomiej Zolnierkiewicz, linuxppc-dev On Thu, Apr 16, 2009 at 10:57 PM, Anton Vorontsov <avorontsov@ru.mvista.com> wrote: > On Thu, Apr 16, 2009 at 09:30:00PM +0200, Bartlomiej Zolnierkiewicz wrote= : >> >> Hi, >> >> On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: >> > Hi, >> > >> > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a >> > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge >> > for IDE, USB and Audio. I did a lot of work to get the pci bus working >> > on this board and it works correctly but the default init code >> > of the alim15x3 driver doesn't work for me. The driver explicitly >> > disabled some initialization code for powerpc after uncommenting this >> > code it works properly. Benjamin Herrenschmidt and I think this >> > !CONFIG_PPC check should be removed because the system behaves >> > like a real 'x86' system (also the i8259 interrupt controller is used)= . >> >> Ben, I guess you are OK with the change and there are no longer other >> platforms requiring CONFIG_PPC check below? =A0[I don't see your ACK her= e] > > I'd like to nak this patch. It'll break MPC8610HPCD boards. > > See commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 > > I'm not sure how should we handle this for Xilinx PPC, MPC8610 > PPC and Sparc all at the same time, but it's obvious that #ifdef > isn't enough any longer... > > > If it is really a board specific issue (in case of powerpc it appears to be one) we could also use the default_irq override in ppc_md. What do you think? Roderick ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 21:27 ` Roderick Colenbrander @ 2009-04-16 22:04 ` Anton Vorontsov 2009-04-17 7:16 ` Roderick Colenbrander 0 siblings, 1 reply; 13+ messages in thread From: Anton Vorontsov @ 2009-04-16 22:04 UTC (permalink / raw) To: Roderick Colenbrander; +Cc: linux-ide, Bartlomiej Zolnierkiewicz, linuxppc-dev On Thu, Apr 16, 2009 at 11:27:34PM +0200, Roderick Colenbrander wrote: > On Thu, Apr 16, 2009 at 10:57 PM, Anton Vorontsov > <avorontsov@ru.mvista.com> wrote: > > On Thu, Apr 16, 2009 at 09:30:00PM +0200, Bartlomiej Zolnierkiewicz wrote: > >> > >> Hi, > >> > >> On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: > >> > Hi, > >> > > >> > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a > >> > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge > >> > for IDE, USB and Audio. I did a lot of work to get the pci bus working > >> > on this board and it works correctly but the default init code > >> > of the alim15x3 driver doesn't work for me. The driver explicitly > >> > disabled some initialization code for powerpc after uncommenting this > >> > code it works properly. Benjamin Herrenschmidt and I think this > >> > !CONFIG_PPC check should be removed because the system behaves > >> > like a real 'x86' system (also the i8259 interrupt controller is used). > >> > >> Ben, I guess you are OK with the change and there are no longer other > >> platforms requiring CONFIG_PPC check below? [I don't see your ACK here] > > > > I'd like to nak this patch. It'll break MPC8610HPCD boards. > > > > See commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 > > > > I'm not sure how should we handle this for Xilinx PPC, MPC8610 > > PPC and Sparc all at the same time, but it's obvious that #ifdef > > isn't enough any longer... > > > > > > > > If it is really a board specific issue (in case of powerpc it appears > to be one) we could also use the default_irq override in ppc_md. What > do you think? Um, I don't see "default_irq" in the ppc_md. Do you want to add one? I wonder if DECLARE_PCI_FIXUP_*() mechanism will work... see arch/powerpc/platforms/fsl_uli1575.c as an example for board-specific PCI fixups. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 22:04 ` Anton Vorontsov @ 2009-04-17 7:16 ` Roderick Colenbrander 0 siblings, 0 replies; 13+ messages in thread From: Roderick Colenbrander @ 2009-04-17 7:16 UTC (permalink / raw) To: avorontsov; +Cc: linux-ide, Bartlomiej Zolnierkiewicz, linuxppc-dev On Fri, Apr 17, 2009 at 12:04 AM, Anton Vorontsov <avorontsov@ru.mvista.com> wrote: > On Thu, Apr 16, 2009 at 11:27:34PM +0200, Roderick Colenbrander wrote: >> On Thu, Apr 16, 2009 at 10:57 PM, Anton Vorontsov >> <avorontsov@ru.mvista.com> wrote: >> > On Thu, Apr 16, 2009 at 09:30:00PM +0200, Bartlomiej Zolnierkiewicz wr= ote: >> >> >> >> Hi, >> >> >> >> On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: >> >> > Hi, >> >> > >> >> > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a >> >> > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge >> >> > for IDE, USB and Audio. I did a lot of work to get the pci bus work= ing >> >> > on this board and it works correctly but the default init code >> >> > of the alim15x3 driver doesn't work for me. The driver explicitly >> >> > disabled some initialization code for powerpc after uncommenting th= is >> >> > code it works properly. Benjamin Herrenschmidt and I think this >> >> > !CONFIG_PPC check should be removed because the system behaves >> >> > like a real 'x86' system (also the i8259 interrupt controller is us= ed). >> >> >> >> Ben, I guess you are OK with the change and there are no longer other >> >> platforms requiring CONFIG_PPC check below? =A0[I don't see your ACK = here] >> > >> > I'd like to nak this patch. It'll break MPC8610HPCD boards. >> > >> > See commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 >> > >> > I'm not sure how should we handle this for Xilinx PPC, MPC8610 >> > PPC and Sparc all at the same time, but it's obvious that #ifdef >> > isn't enough any longer... >> > >> > >> > >> >> If it is really a board specific issue (in case of powerpc it appears >> to be one) we could also use the default_irq override in ppc_md. What >> do you think? > > Um, I don't see "default_irq" in the ppc_md. Do you want to add one? > > I wonder if DECLARE_PCI_FIXUP_*() mechanism will work... see > arch/powerpc/platforms/fsl_uli1575.c as an example for board-specific > PCI fixups. It seems default_irq was the name on old kernels. These days it is called pci_get_legacy_ide_irq. Roderick ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-16 19:30 ` RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems Bartlomiej Zolnierkiewicz 2009-04-16 20:16 ` Grant Likely 2009-04-16 20:57 ` Anton Vorontsov @ 2009-04-17 7:40 ` Benjamin Herrenschmidt 2009-04-17 12:40 ` Anton Vorontsov 2 siblings, 1 reply; 13+ messages in thread From: Benjamin Herrenschmidt @ 2009-04-17 7:40 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Roderick Colenbrander, linuxppc-dev On Thu, 2009-04-16 at 21:30 +0200, Bartlomiej Zolnierkiewicz wrote: > Hi, > > On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: > > Hi, > > > > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a > > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge > > for IDE, USB and Audio. I did a lot of work to get the pci bus working > > on this board and it works correctly but the default init code > > of the alim15x3 driver doesn't work for me. The driver explicitly > > disabled some initialization code for powerpc after uncommenting this > > code it works properly. Benjamin Herrenschmidt and I think this > > !CONFIG_PPC check should be removed because the system behaves > > like a real 'x86' system (also the i8259 interrupt controller is used). > > Ben, I guess you are OK with the change and there are no longer other > platforms requiring CONFIG_PPC check below? [I don't see your ACK here] Yup. I don't see a case where the hack would be of any use, so I'm happy to remove us from the test. Whenever a 8259 is present we assign it the legacy interrupts 1...15 with a virtual==physical mapping so all those x86-ish things should run just fine. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > > Regards, > > Roderick Colenbrander > > > > > > From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 > > From: Roderick Colenbrander <thunderbird2k@gmail.com> > > Date: Wed, 15 Apr 2009 10:45:17 +0200 > > Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for > > x86-like PowerPC boards like Xilinx ML310/410/510. > > Roderick, please add your "Signed-off-by:" line > (per Documentation/SubmittingPatches). > > Thanks. > > > --- > > drivers/ide/alim15x3.c | 9 +++++---- > > 1 files changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c > > index 537da1c..9176c0f 100644 > > --- a/drivers/ide/alim15x3.c > > +++ b/drivers/ide/alim15x3.c > > @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) > > return cbl; > > } > > > > -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) > > +#if !defined(CONFIG_SPARC64) > > /** > > * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff > > * @hwif: interface to configure > > * > > * Obtain the IRQ tables for an ALi based IDE solution on the PC > > - * class platforms. This part of the code isn't applicable to the > > - * Sparc and PowerPC systems. > > + * class platforms. This part of the code isn't applicable to > > + * Sparc systems. It is usable on 'x86-like' PowerPC systems > > + * which use a Ali M15x3 south bridge like e.g. Xilinx ML310/410/510. > > */ > > > > static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > } > > #else > > #define init_hwif_ali15x3 NULL > > -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ > > +#endif /* !defined(CONFIG_SPARC64) */ > > > > /** > > * init_dma_ali15x3 - set up DMA on ALi15x3 > > -- > > 1.5.6.3 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-17 7:40 ` Benjamin Herrenschmidt @ 2009-04-17 12:40 ` Anton Vorontsov 2009-04-17 16:49 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 13+ messages in thread From: Anton Vorontsov @ 2009-04-17 12:40 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: linux-ide, Roderick Colenbrander, Bartlomiej Zolnierkiewicz, linuxppc-dev On Fri, Apr 17, 2009 at 09:40:19AM +0200, Benjamin Herrenschmidt wrote: > On Thu, 2009-04-16 at 21:30 +0200, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > > > On Wednesday 15 April 2009 16:34:22 Roderick Colenbrander wrote: > > > Hi, > > > > > > I'm using a Xilinx ML510 it features a PowerPC 440 cpu inside a > > > Virtex-5 FPGA. The board also contains a ALI M1533 south bridge > > > for IDE, USB and Audio. I did a lot of work to get the pci bus working > > > on this board and it works correctly but the default init code > > > of the alim15x3 driver doesn't work for me. The driver explicitly > > > disabled some initialization code for powerpc after uncommenting this > > > code it works properly. Benjamin Herrenschmidt and I think this > > > !CONFIG_PPC check should be removed because the system behaves > > > like a real 'x86' system (also the i8259 interrupt controller is used). > > > > Ben, I guess you are OK with the change and there are no longer other > > platforms requiring CONFIG_PPC check below? [I don't see your ACK here] > > Yup. I don't see a case where the hack would be of any use, so I'm > happy to remove us from the test. Whenever a 8259 is present we > assign it the legacy interrupts 1...15 with a virtual==physical mapping > so all those x86-ish things should run just fine. But they don't. On MPC8610HPCD we have IDE interrupt directly connected to the MPIC line (through PCI sideband interrupt), and i8259 is _completely_ disabled in the bridge. See this commit: commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 Author: Anton Vorontsov <avorontsov@ru.mvista.com> Date: Tue Apr 29 22:57:38 2008 +0200 alim15x3: disable init_hwif_ali15x3 for PowerPC > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> If the patch applied, MPC8610HPCD will be broken. We need at least some machine_is() check. > > > Regards, > > > Roderick Colenbrander > > > > > > > > > From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 > > > From: Roderick Colenbrander <thunderbird2k@gmail.com> > > > Date: Wed, 15 Apr 2009 10:45:17 +0200 > > > Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for > > > x86-like PowerPC boards like Xilinx ML310/410/510. > > > > Roderick, please add your "Signed-off-by:" line > > (per Documentation/SubmittingPatches). > > > > Thanks. > > > > > --- > > > drivers/ide/alim15x3.c | 9 +++++---- > > > 1 files changed, 5 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c > > > index 537da1c..9176c0f 100644 > > > --- a/drivers/ide/alim15x3.c > > > +++ b/drivers/ide/alim15x3.c > > > @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) > > > return cbl; > > > } > > > > > > -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) > > > +#if !defined(CONFIG_SPARC64) > > > /** > > > * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff > > > * @hwif: interface to configure > > > * > > > * Obtain the IRQ tables for an ALi based IDE solution on the PC > > > - * class platforms. This part of the code isn't applicable to the > > > - * Sparc and PowerPC systems. > > > + * class platforms. This part of the code isn't applicable to > > > + * Sparc systems. It is usable on 'x86-like' PowerPC systems > > > + * which use a Ali M15x3 south bridge like e.g. Xilinx ML310/410/510. > > > */ > > > > > > static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > > @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > > } > > > #else > > > #define init_hwif_ali15x3 NULL > > > -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ > > > +#endif /* !defined(CONFIG_SPARC64) */ > > > > > > /** > > > * init_dma_ali15x3 - set up DMA on ALi15x3 > > > -- > > > 1.5.6.3 > > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-17 12:40 ` Anton Vorontsov @ 2009-04-17 16:49 ` Benjamin Herrenschmidt 2009-04-17 18:17 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 13+ messages in thread From: Benjamin Herrenschmidt @ 2009-04-17 16:49 UTC (permalink / raw) To: avorontsov Cc: linux-ide, Roderick Colenbrander, Bartlomiej Zolnierkiewicz, linuxppc-dev > But they don't. On MPC8610HPCD we have IDE interrupt directly > connected to the MPIC line (through PCI sideband interrupt), and > i8259 is _completely_ disabled in the bridge. Hrm why did you do that ? :-) Just kidding... if what you want is the PCI interrupt, then it should be in native mode, not legacy mode... Maybe the driver can figure out how the chip is configured by reading said configuration and use either the legacy interrupts or the PCI one... > See this commit: > > commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 > Author: Anton Vorontsov <avorontsov@ru.mvista.com> > Date: Tue Apr 29 22:57:38 2008 +0200 > > alim15x3: disable init_hwif_ali15x3 for PowerPC > > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > > If the patch applied, MPC8610HPCD will be broken. > > We need at least some machine_is() check. That sucks. That's an endless problems with IDE and those on-board chipsets though. The interrupts should pretty much -always- be provided by the arch code, but for some reason, that got removed in favor of various hacks in the drivers themselves... Ben. > > > > Regards, > > > > Roderick Colenbrander > > > > > > > > > > > > From 1c40c2f1485ecd3bc5ad7a3af537cb94de0877c3 Mon Sep 17 00:00:00 2001 > > > > From: Roderick Colenbrander <thunderbird2k@gmail.com> > > > > Date: Wed, 15 Apr 2009 10:45:17 +0200 > > > > Subject: [PATCH] Use the 'x86' init_hwif code in the alim15x3 for > > > > x86-like PowerPC boards like Xilinx ML310/410/510. > > > > > > Roderick, please add your "Signed-off-by:" line > > > (per Documentation/SubmittingPatches). > > > > > > Thanks. > > > > > > > --- > > > > drivers/ide/alim15x3.c | 9 +++++---- > > > > 1 files changed, 5 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c > > > > index 537da1c..9176c0f 100644 > > > > --- a/drivers/ide/alim15x3.c > > > > +++ b/drivers/ide/alim15x3.c > > > > @@ -402,14 +402,15 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) > > > > return cbl; > > > > } > > > > > > > > -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) > > > > +#if !defined(CONFIG_SPARC64) > > > > /** > > > > * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff > > > > * @hwif: interface to configure > > > > * > > > > * Obtain the IRQ tables for an ALi based IDE solution on the PC > > > > - * class platforms. This part of the code isn't applicable to the > > > > - * Sparc and PowerPC systems. > > > > + * class platforms. This part of the code isn't applicable to > > > > + * Sparc systems. It is usable on 'x86-like' PowerPC systems > > > > + * which use a Ali M15x3 south bridge like e.g. Xilinx ML310/410/510. > > > > */ > > > > > > > > static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > > > @@ -455,7 +456,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) > > > > } > > > > #else > > > > #define init_hwif_ali15x3 NULL > > > > -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ > > > > +#endif /* !defined(CONFIG_SPARC64) */ > > > > > > > > /** > > > > * init_dma_ali15x3 - set up DMA on ALi15x3 > > > > -- > > > > 1.5.6.3 > > > > _______________________________________________ > > Linuxppc-dev mailing list > > Linuxppc-dev@ozlabs.org > > https://ozlabs.org/mailman/listinfo/linuxppc-dev > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-17 16:49 ` Benjamin Herrenschmidt @ 2009-04-17 18:17 ` Bartlomiej Zolnierkiewicz 2009-04-17 18:23 ` Anton Vorontsov 0 siblings, 1 reply; 13+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2009-04-17 18:17 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: linux-ide, Roderick Colenbrander, linuxppc-dev On Friday 17 April 2009 18:49:44 Benjamin Herrenschmidt wrote: > > But they don't. On MPC8610HPCD we have IDE interrupt directly > > connected to the MPIC line (through PCI sideband interrupt), and > > i8259 is _completely_ disabled in the bridge. > > Hrm why did you do that ? :-) > > Just kidding... if what you want is the PCI interrupt, then it should > be in native mode, not legacy mode... Maybe the driver can figure out > how the chip is configured by reading said configuration and use > either the legacy interrupts or the PCI one... > > > See this commit: > > > > commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 > > Author: Anton Vorontsov <avorontsov@ru.mvista.com> > > Date: Tue Apr 29 22:57:38 2008 +0200 > > > > alim15x3: disable init_hwif_ali15x3 for PowerPC > > > > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > > > > If the patch applied, MPC8610HPCD will be broken. > > > > We need at least some machine_is() check. > > That sucks. That's an endless problems with IDE and those on-board > chipsets though. The interrupts should pretty much -always- be provided > by the arch code, but for some reason, that got removed in favor of > various hacks in the drivers themselves... Previous PPC IRQ hacks combined with IDE IRQ hacks were a real nightmare from maintenance perspective -- one could just never tell what is going on and whether it is correct. IDE host driver specific hacks were just a necessary temporary step into solving this problem and most of them got removed in this merge window during more general rework of IRQ setup code. Nowadays IDE PCI layer just consistently uses arch specific (+ non-IDE specific so libata gets benefits too) pci_get_legacy_ide_irq() helper for legacy IRQs, please see ide_pci_init_one(): ... /* fixup IRQ */ if (ide_pci_is_in_compatibility_mode(dev)) { hw[0].irq = pci_get_legacy_ide_irq(dev, 0); hw[1].irq = pci_get_legacy_ide_irq(dev, 1); } else hw[1].irq = hw[0].irq = ret; ... That's all! No PPC-specific IRQ overrides, IDE-specific IRQ overrides and IDE host driver ones needed! :) There is still some legacy code (like the one in alim15x3 host driver) needing fixing but the infrastructure allowing it should be all there. Hmm, it looks like this historical IRQ override in init_hwif_ali15x3(): if (dev->device == PCI_DEVICE_ID_AL_M5229) hwif->irq = hwif->channel ? 15 : 14; should be just removed nowadays. Seems like this should allow MPC8610HPCD to work with Roderick's patch if the IDE controller is set to native mode and ALI south-bridge SIRQ tables are correctly set (or if this is not ALI's south-bridge). Anton? Thanks, Bart ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems 2009-04-17 18:17 ` Bartlomiej Zolnierkiewicz @ 2009-04-17 18:23 ` Anton Vorontsov [not found] ` <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com> 0 siblings, 1 reply; 13+ messages in thread From: Anton Vorontsov @ 2009-04-17 18:23 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz; +Cc: linuxppc-dev, Roderick Colenbrander, linux-ide On Fri, Apr 17, 2009 at 08:17:18PM +0200, Bartlomiej Zolnierkiewicz wrote: > On Friday 17 April 2009 18:49:44 Benjamin Herrenschmidt wrote: > > > But they don't. On MPC8610HPCD we have IDE interrupt directly > > > connected to the MPIC line (through PCI sideband interrupt), and > > > i8259 is _completely_ disabled in the bridge. > > > > Hrm why did you do that ? :-) > > > > Just kidding... if what you want is the PCI interrupt, then it should > > be in native mode, not legacy mode... Maybe the driver can figure out > > how the chip is configured by reading said configuration and use > > either the legacy interrupts or the PCI one... > > > > > See this commit: > > > > > > commit 6d1cee44361b8d06ccd1812e80448d86ae60dfe3 > > > Author: Anton Vorontsov <avorontsov@ru.mvista.com> > > > Date: Tue Apr 29 22:57:38 2008 +0200 > > > > > > alim15x3: disable init_hwif_ali15x3 for PowerPC > > > > > > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > > > > > > If the patch applied, MPC8610HPCD will be broken. > > > > > > We need at least some machine_is() check. > > > > That sucks. That's an endless problems with IDE and those on-board > > chipsets though. The interrupts should pretty much -always- be provided > > by the arch code, but for some reason, that got removed in favor of > > various hacks in the drivers themselves... > > Previous PPC IRQ hacks combined with IDE IRQ hacks were a real nightmare > from maintenance perspective -- one could just never tell what is going > on and whether it is correct. > > IDE host driver specific hacks were just a necessary temporary step into > solving this problem and most of them got removed in this merge window > during more general rework of IRQ setup code. > > Nowadays IDE PCI layer just consistently uses arch specific (+ non-IDE > specific so libata gets benefits too) pci_get_legacy_ide_irq() helper > for legacy IRQs, please see ide_pci_init_one(): > > ... > /* fixup IRQ */ > if (ide_pci_is_in_compatibility_mode(dev)) { > hw[0].irq = pci_get_legacy_ide_irq(dev, 0); > hw[1].irq = pci_get_legacy_ide_irq(dev, 1); > } else > hw[1].irq = hw[0].irq = ret; > ... > > That's all! No PPC-specific IRQ overrides, IDE-specific IRQ overrides > and IDE host driver ones needed! :) > > There is still some legacy code (like the one in alim15x3 host driver) > needing fixing but the infrastructure allowing it should be all there. > > Hmm, it looks like this historical IRQ override in init_hwif_ali15x3(): > > if (dev->device == PCI_DEVICE_ID_AL_M5229) > hwif->irq = hwif->channel ? 15 : 14; > > should be just removed nowadays. > > Seems like this should allow MPC8610HPCD to work with Roderick's patch > if the IDE controller is set to native mode and ALI south-bridge SIRQ > tables are correctly set (or if this is not ALI's south-bridge). Anton? OK, I'll test this approach. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com>]
* [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC [not found] ` <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com> @ 2009-04-27 18:47 ` Anton Vorontsov 2009-04-30 16:39 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 13+ messages in thread From: Anton Vorontsov @ 2009-04-27 18:47 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz; +Cc: linuxppc-dev, Roderick Colenbrander, linux-ide Some time ago we had to disable init_hwif callback for PowerPC builds. That was because of a historical IRQ overwrite in the driver, which was causing IDE malfunction on the MPC8610HPCD PowerPC boards. It's unclear whether this overwrite is still useful, but it is proven to cause a bit of harm, and today some PowerPC targets (Xilinx ML510, as reported by Roderick Colenbrander) need the init_hwif, so we have to re-enable it and remove the overwrite. Reported-by: Roderick Colenbrander <thunderbird2k@gmail.com> Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> --- On Mon, Apr 27, 2009 at 10:46:25AM +0200, Roderick Colenbrander wrote: > >> Seems like this should allow MPC8610HPCD to work with Roderick's patch > >> if the IDE controller is set to native mode and ALI south-bridge SIRQ > >> tables are correctly set (or if this is not ALI's south-bridge). Anton? > > > > OK, I'll test this approach. > > > > Did this approach work for you? I'm sorry for the delay. Yes, it seem to work. drivers/ide/alim15x3.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c index 537da1c..e59b6de 100644 --- a/drivers/ide/alim15x3.c +++ b/drivers/ide/alim15x3.c @@ -402,27 +402,23 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) return cbl; } -#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) +#ifndef CONFIG_SPARC64 /** * init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff * @hwif: interface to configure * * Obtain the IRQ tables for an ALi based IDE solution on the PC * class platforms. This part of the code isn't applicable to the - * Sparc and PowerPC systems. + * Sparc systems. */ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) { - struct pci_dev *dev = to_pci_dev(hwif->dev); u8 ideic, inmir; s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 }; int irq = -1; - if (dev->device == PCI_DEVICE_ID_AL_M5229) - hwif->irq = hwif->channel ? 15 : 14; - if (isa_dev) { /* * read IDE interface control @@ -455,7 +451,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) } #else #define init_hwif_ali15x3 NULL -#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */ +#endif /* CONFIG_SPARC64 */ /** * init_dma_ali15x3 - set up DMA on ALi15x3 -- 1.6.2.2 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC 2009-04-27 18:47 ` [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC Anton Vorontsov @ 2009-04-30 16:39 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 13+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2009-04-30 16:39 UTC (permalink / raw) To: avorontsov; +Cc: linuxppc-dev, Roderick Colenbrander, linux-ide On Monday 27 April 2009 20:47:42 Anton Vorontsov wrote: > Some time ago we had to disable init_hwif callback for PowerPC builds. > That was because of a historical IRQ overwrite in the driver, which > was causing IDE malfunction on the MPC8610HPCD PowerPC boards. > > It's unclear whether this overwrite is still useful, but it is proven > to cause a bit of harm, and today some PowerPC targets (Xilinx ML510, > as reported by Roderick Colenbrander) need the init_hwif, so we have > to re-enable it and remove the overwrite. > > Reported-by: Roderick Colenbrander <thunderbird2k@gmail.com> > Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> thanks, I applied it to ide-2.6.git/for-next ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-04-30 16:37 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <c8485d470904150202s1f5c8cd7p34f0eaf4872f3e17@mail.gmail.com>
[not found] ` <c8485d470904150734s47ce0f27y3ae984355e823d9f@mail.gmail.com>
2009-04-16 19:30 ` RFC Patch: Use x86 init_hwif in the alim15x3 for x86-like PowerPC systems Bartlomiej Zolnierkiewicz
2009-04-16 20:16 ` Grant Likely
2009-04-16 20:57 ` Anton Vorontsov
2009-04-16 21:27 ` Roderick Colenbrander
2009-04-16 22:04 ` Anton Vorontsov
2009-04-17 7:16 ` Roderick Colenbrander
2009-04-17 7:40 ` Benjamin Herrenschmidt
2009-04-17 12:40 ` Anton Vorontsov
2009-04-17 16:49 ` Benjamin Herrenschmidt
2009-04-17 18:17 ` Bartlomiej Zolnierkiewicz
2009-04-17 18:23 ` Anton Vorontsov
[not found] ` <c8485d470904270146g7b7204eckc58cd57449a41f45@mail.gmail.com>
2009-04-27 18:47 ` [PATCH] alim15x3: Remove historical hacks, re-enable init_hwif for PowerPC Anton Vorontsov
2009-04-30 16:39 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).