RE: [PATCH/RFC 4/4] sh-sci: Derive regshift value from DT compatible value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

On Tuesday, August 07, 2018, Geert Uytterhoeven wrote:
> > I see that you added this:
> >
> > OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210",
> rza2_early_console_setup);
> >
> >  and "renesas,scif-r7s9210" matches what I have in my .dtsi.
> >
> > But, when I run the code, I end up in function scif_early_console_setup,
> > not rza2_early_console_setup
> 
> Hmm, perhaps it doesn't pick the first/most specialized match.

It seems it picks the first match.

But, the table is built in the opposite order in which they are declared
in the file. So "renesas,scif" was coming before 
"renesas,scif-r7s9210".

So, by just swapping the order of "renesas,scif" and 
"renesas,scif-r7s9210" made it work!


--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3423,8 +3423,8 @@ static int __init hscif_early_console_setup(struct earlycon_device *device,
 }
 
 OF_EARLYCON_DECLARE(sci, "renesas,sci", sci_early_console_setup);
-OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210", rza2_early_console_setup);
 OF_EARLYCON_DECLARE(scif, "renesas,scif", scif_early_console_setup);
+OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210", rza2_early_console_setup);
 OF_EARLYCON_DECLARE(scifa, "renesas,scifa", scifa_early_console_setup);
 OF_EARLYCON_DECLARE(scifb, "renesas,scifb", scifb_early_console_setup);
 OF_EARLYCON_DECLARE(hscif, "renesas,hscif", hscif_early_console_setup);


  -- log --
Booting Linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.18.0-rc7-00017-g70cdb4f243c6-dirty (chris@ubuntu) (gcc version 5.4.1 20161213 (Linaro GCC 5.4-2017.01)) #23 Tue Aug 7 19:04:25 EST 2018
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=50c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: RZA2MEVB
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] earlycon: scif0 at MMIO 0xe8009000 (options '115200n8')
[    0.000000] bootconsole [scif256] enabled



Chris

��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux