powerpc, 8xx: Modernise the 8xx
Subsystems (4)
cover powerpc, 8xx: Modernise the 8xx
This patchset modernises the resurrected 8xx.
Christophe Leroy (7):
powerpc, 8xx: move specific reginfo
powerpc, 8xx: Implement GLL2 ERRATA
powerpc, 8xx: Properly set CPM frequency in the device tree powerpc, 8xx: Migrate to Kconfig
powerpc, 8xx: move FEC Ethernet driver in drivers/net powerpc, 8xx: move SPI driver to drivers/spi/ powerpc, 8xx: move Serial driver to drivers/serial/
README | 49 -------
arch/powerpc/cpu/mpc8xx/Kconfig | 147 +++++++++++++++++++++
arch/powerpc/cpu/mpc8xx/Makefile | 4 +-
arch/powerpc/cpu/mpc8xx/cpu.c | 2 +-
arch/powerpc/cpu/mpc8xx/cpu_init.c | 12 +-
arch/powerpc/cpu/mpc8xx/fdt.c | 2 +
{cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c | 30 +----
arch/powerpc/include/asm/ppc.h | 5 -
arch/powerpc/lib/Kconfig | 1 +
arch/powerpc/lib/immap.c | 4 -
cmd/reginfo.c | 54 +-------
drivers/i2c/soft_i2c.c | 2 +-
drivers/net/Kconfig | 58 ++++++++
drivers/net/Makefile | 1 +
.../cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c | 26 +---
drivers/serial/Kconfig | 72 ++++++++++
drivers/serial/Makefile | 1 +
.../serial.c => drivers/serial/serial_mpc8xx.c | 15 ---
drivers/spi/Kconfig | 6 +
drivers/spi/Makefile | 1 +
.../cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c | 3 -
scripts/config_whitelist.txt | 24 ----
22 files changed, 310 insertions(+), 209 deletions(-)
copy {cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c (78%)
rename arch/powerpc/cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c (96%)
rename arch/powerpc/cpu/mpc8xx/serial.c => drivers/serial/serial_mpc8xx.c (97%)
rename arch/powerpc/cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c (99%)Signature · 1 line
2.12.0
PATCH 1/7 powerpc, 8xx: move specific reginfo
---
This serie applies after the patch "[v5] powerpc: Partialy restore core of mpc8xx"
arch/powerpc/cpu/mpc8xx/Makefile | 1 +
{cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c | 30 +----------------
cmd/reginfo.c | 54 ++----------------------------
3 files changed, 4 insertions(+), 81 deletions(-)
copy {cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c (78%)arch/powerpc/cpu/mpc8xx/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-y += cpu_init.o obj-y += fec.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-y += interrupts.o +obj-$(CONFIG_CMD_REGINFO) += reginfo.o obj-y += serial.o obj-y += speed.o obj-y += spi.o
arch/powerpc/cpu/mpc8xx/reginfo.c renamed from cmd/reginfo.c +1 -29
@@ -6,19 +6,10 @@*/ #include <common.h> -#include <command.h> -#if defined(CONFIG_8xx)#include <mpc8xx.h> -#elif defined (CONFIG_MPC86xx) -extern void mpc86xx_reginfo (void ); -#elif defined(CONFIG_MPC85xx) -extern void mpc85xx_reginfo (void ); -#endif -static int do_reginfo (cmd_tbl_t *cmdtp,int flag,int argc, -char *const argv[]) +void mpc8xx_reginfo (void ) { -#if defined(CONFIG_8xx)volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile memctl8xx_t *memctl = &immap->im_memctl;volatile sysconf8xx_t *sysconf = &immap->im_siu_conf;
@@ -70,23 +61,4 @@ static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,/* * May be some CPM info here? */ - -#elif defined(CONFIG_MPC86xx) -mpc86xx_reginfo (); - -#elif defined(CONFIG_MPC85xx) -mpc85xx_reginfo (); -#endif - -return 0 ; } - -/**************************************************/ - -#if defined(CONFIG_CMD_REGINFO ) -U_BOOT_CMD ( - reginfo,2 ,1 , do_reginfo, -"print register information" , -"" -); -#endif
cmd/reginfo.c +2 -52
66 lines not on this page · raw message
Signature · 1 line
2.12.0
PATCH 2/7 powerpc, 8xx: Implement GLL2 ERRATA
In reply to Christophe Leroy--- arch/powerpc/cpu/mpc8xx/cpu_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/powerpc/cpu/mpc8xx/cpu_init.c +10 -0
@@ -55,6 +55,16 @@ void cpu_init_f (volatile immap_t * immr) reg |=CONFIG_SYS_SCCR ; immr->im_clkrst.car_sccr = reg; +/* BUG MPC866 GLL2 consideration */ + reg = immr->im_clkrst.car_sccr; +/* probably we use the mode 1:2:1 */ +if ((reg &0x00060000 ) ==0x00020000 ) { + reg &= ~0x00060000 ; + immr->im_clkrst.car_sccr = reg; + reg |=0x00020000 ; + immr->im_clkrst.car_sccr = reg; + } +/* PLL (CPU clock) settings (15-30) */ immr->im_clkrstk.cark_plprcrk =KAPWR_KEY ;
Signature · 1 line
2.12.0
PATCH 2/7 powerpc, 8xx: Implement GLL2 ERRATA
Dear Christophe Leroy,
Quoted 13 lines · In message <8947f895b86efe0396b1825998a64a3340fff597.1498751837.git.christophe.…
Signed-off-by Christophe Leroy <[email protected]>--- arch/powerpc/cpu/mpc8xx/cpu_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/powerpc/cpu/mpc8xx/cpu_init.c +0
-0@@ -55,6 +55,16 @@ void cpu_init_f (volatile immap_t * immr) reg |=CONFIG_SYS_SCCR ; immr->im_clkrst.car_sccr = reg;
arch/powerpc/cpu/mpc8xx/cpu_init.c void cpu_init_f (volatile immap_t * immr) · line 67
Quoted 10 lines
arch/powerpc/cpu/mpc8xx/cpu_init.c +10
-0+/* BUG MPC866 GLL2 consideration */ + reg = immr->im_clkrst.car_sccr; +/* probably we use the mode 1:2:1 */ +if ((reg &0x00060000 ) ==0x00020000 ) { + reg &= ~0x00060000 ; + immr->im_clkrst.car_sccr = reg; + reg |=0x00020000 ; + immr->im_clkrst.car_sccr = reg; + } +
This is an excellent example for future situations, so thanks a lot for bringing it up early.
The code you are adding here violates basic (modern) programming standards. To access device registers, proper I/O accessors must be used. In this case the code should use the clrsetbits_be32() macro.
Strictly speaking, you should receive a full NAK on this code.
You may now argument that the surrounding code is full of similar examples of obsolete, broken code, and you are just following this (bad) example.
The standard reply to this would be: well, while you are modifying this file, please clean up the other ocurrences of such bad code as well.
Are you aware of this process? How do you think to handle such situations in the future?
What I really, really am scared of is that you might follow your employer's requirements ("new version only introduces a reduced amount of modifications in source code") instead of following your duties as a custodian (cleaning up the code to meet current programming standards).
Can you please make an explixit statement here how you are going to handle this in the future? [And again, schedule is important, too.]
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Diplomacy is the art of saying "nice doggy" until you can find a rock.
PATCH 2/7 powerpc, 8xx: Implement GLL2 ERRATA
Quoted 30 lines · Wolfgang Denk
Dear Christophe Leroy,
Quoted 13 lines · In message <8947f895b86efe0396b1825998a64a3340fff597.1498751837.git.christophe.…
Signed-off-by Christophe Leroy <[email protected]>--- arch/powerpc/cpu/mpc8xx/cpu_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/powerpc/cpu/mpc8xx/cpu_init.c +0
-0@@ -55,6 +55,16 @@ void cpu_init_f (volatile immap_t * immr) reg |=CONFIG_SYS_SCCR ; immr->im_clkrst.car_sccr = reg;arch/powerpc/cpu/mpc8xx/cpu_init.c void cpu_init_f (volatile immap_t * immr) · line 67
Quoted 10 lines
arch/powerpc/cpu/mpc8xx/cpu_init.c +10
-0+/* BUG MPC866 GLL2 consideration */ + reg = immr->im_clkrst.car_sccr; +/* probably we use the mode 1:2:1 */ +if ((reg &0x00060000 ) ==0x00020000 ) { + reg &= ~0x00060000 ; + immr->im_clkrst.car_sccr = reg; + reg |=0x00020000 ; + immr->im_clkrst.car_sccr = reg; + } +This is an excellent example for future situations, so thanks a lot for bringing it up early.
Quoted 3 lines
The code you are adding here violates basic (modern) programming standards. To access device registers, proper I/O accessors must be used. In this case the code should use the
clrsetbits_be32()macro.
Oh right, that's the way it is done in Linux Kernel, I used to be surprised it was not that way in U-Boot. If it is like this now, that's good.
Quoted 6 lines
Strictly speaking, you should receive a full NAK on this code.
You may now argument that the surrounding code is full of similar examples of obsolete, broken code, and you are just following this (bad) example.
No, I may argument that the code I'm submitting is not new code but code that was written in 2010, and maybe even before, when we were using ppcboot.
Quoted 8 lines
The standard reply to this would be: well, while you are modifying this file, please clean up the other ocurrences of such bad code as well.
Are you aware of this process? How do you think to handle such situations in the future?
I am now :)
I'll keep it in mind for the future.
Quoted 7 lines
What I really, really am scared of is that you might follow your employer's requirements ("new version only introduces a reduced amount of modifications in source code") instead of following your duties as a custodian (cleaning up the code to meet current programming standards).
Do not worry. Any justified improvement is worth it. My only employer's requirement is "make sure it will be accepted by Air Trafic Control authorities". All is a matter of justification and I'm not worried about it as far as I manage to keep commits focussed on only one thing. U-boot General Patch Submission Rules states 'Changes that contain different, unrelated modifications shall be submitted as separate patches, one patch per changeset', so this is not in contradiction with my needs.
What the auditors really focus on is the deltas between the COTS (ie the official U-boot release) and the sources we use for them. So it is of our interest to have our changes/fixes properly merged into U-boot.
Quoted 3 lines
Can you please make an explixit statement here how you are going to handle this in the future? [And again, schedule is important, too.]
My plan is to convert to the use of IO accessors during this week.
Best regards
Christophe
Quoted 5 lines
Best regards,
Wolfgang Denk
PATCH 2/7 powerpc, 8xx: Implement GLL2 ERRATA
Dear Christophe,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 4 lines
The code you are adding here violates basic (modern) programming standards. To access device registers, proper I/O accessors must be used. In this case the code should use the
clrsetbits_be32()macro.Oh right, that's the way it is done in Linux Kernel, I used to be surprised it was not that way in U-Boot. If it is like this now, that's good.
It's been here for ages as well. It's only really ancient (and not well maintained) code that does not use it yet.
Quoted 6 lines
Quoted 3 lines
You may now argument that the surrounding code is full of similar examples of obsolete, broken code, and you are just following this (bad) example.
No, I may argument that the code I'm submitting is not new code but code that was written in 2010, and maybe even before, when we were using ppcboot.
So what? You are submitting it today, to be included into curent mainline.
Quoted 5 lines
Quoted 2 lines
Are you aware of this process? How do you think to handle such situations in the future?
I am now :)
I'll keep it in mind for the future.
The Correct Thing (TM) to do here is to submit two patches: a first one to convert the file in question to using I/O accessors, and a second one to extend the code as needed.
Quoted 3 lines
What the auditors really focus on is the deltas between the COTS (ie the official U-boot release) and the sources we use for them. So it is of our interest to have our changes/fixes properly merged into U-boot.
I'm perplexed. If that was the case then why did you never care to minimize such differences?
Quoted 5 lines
Quoted 3 lines
Can you please make an explixit statement here how you are going to handle this in the future? [And again, schedule is important, too.]
My plan is to convert to the use of IO accessors during this week.
Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The ideal situation is to have massive computing power right at home. Something that dims the streetlights and shrinks the picture on the neighbours' TVs when you boot it up.
PATCH 3/7 powerpc, 8xx: Properly set CPM frequency in the device tree
In reply to Christophe LeroyFor processors whose core runs at twice the bus frequency, the fallback frequency calculation in Linux provides a wrong result. Therefore, U-boot needs to pass the correct value.
--- arch/powerpc/cpu/mpc8xx/fdt.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/cpu/mpc8xx/fdt.c +2 -0
@@ -20,6 +20,8 @@ void ft_cpu_setup(void *blob, bd_t *bd) "bus-frequency", bd->bi_busfreq, 1);do_fixup_by_prop_u32 (blob,"device_type" ,"cpu" ,4 ,"clock-frequency" , bd->bi_intfreq,1 ); +do_fixup_by_compat_u32 (blob,"fsl,pq1-soc" ,"clock-frequency" , + bd->bi_intfreq,1 );do_fixup_by_compat_u32 (blob,"fsl,cpm-brg" ,"clock-frequency" , gd->arch.brg_clk,1 );
Signature · 1 line
2.12.0
PATCH 4/7 powerpc, 8xx: Migrate to Kconfig
In reply to Christophe Leroy--- README | 15 ---- arch/powerpc/cpu/mpc8xx/Kconfig | 147 +++++++++++++++++++++++++++++++++++++ arch/powerpc/cpu/mpc8xx/cpu_init.c | 2 +- arch/powerpc/cpu/mpc8xx/fec.c | 8 +- arch/powerpc/include/asm/ppc.h | 5 -- arch/powerpc/lib/Kconfig | 1 + arch/powerpc/lib/immap.c | 4 - drivers/i2c/soft_i2c.c | 2 +- scripts/config_whitelist.txt | 11 --- 9 files changed, 154 insertions(+), 41 deletions(-)
README +0 -15
@@ -328,9 +328,6 @@ The following options need to be configured: multiple fs option at one time for marvell soc family -- 8xx CPU Options: (if using an MPC8xx CPU) - CONFIG_8xx_GCLK_FREQ - CPU clock - - 85xx CPU Options: CONFIG_SYS_PPC64
@@ -3993,16 +3990,6 @@ Low Level (hardware related) configuration options: point to an otherwise UNUSED address space between the top of RAM and the start of the PCI space. -- CONFIG_SYS_SIUMCR: SIU Module Configuration (11-6) - -- CONFIG_SYS_SYPCR: System Protection Control (11-9) - -- CONFIG_SYS_TBSCR: Time Base Status and Control (11-26) - -- CONFIG_SYS_PISCR: Periodic Interrupt Status and Control (11-31) - -- CONFIG_SYS_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30) - - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27) - CONFIG_SYS_OR_TIMING_SDRAM:
@@ -4011,8 +3998,6 @@ Low Level (hardware related) configuration options: - CONFIG_SYS_MAMR_PTA: periodic timer for refresh -- CONFIG_SYS_DER: Debug Event Register (37-47) - - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM, CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP, CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM,
arch/powerpc/cpu/mpc8xx/Kconfig +147 -0
151 lines not on this page · raw message
arch/powerpc/cpu/mpc8xx/cpu_init.c +1 -1
@@ -51,7 +51,7 @@ void cpu_init_f (volatile immap_t * immr) immr->im_clkrstk.cark_sccrk =KAPWR_KEY ; reg = immr->im_clkrst.car_sccr; - reg &=SCCR_MASK ; + reg &=CONFIG_SYS_SCCR_MASK ; reg |=CONFIG_SYS_SCCR ; immr->im_clkrst.car_sccr = reg;
arch/powerpc/cpu/mpc8xx/fec.c +4 -4
@@ -383,7 +383,7 @@ static void fec_pin_init(int fecidx)*/ immr->im_cpm.cp_fec1.fec_mii_speed = ((bd->bi_intfreq +4999999 ) /5000000 ) <<1 ; -#if defined(CONFIG_MPC885_FAMILY ) && defined(WANT_MII ) +#if defined(CONFIG_MPC885 ) && defined(WANT_MII )/* use MDC for MII */ immr->im_ioport.iop_pdpar |=0x0080 ; immr->im_ioport.iop_pddir &= ~0x0080 ;
@@ -392,7 +392,7 @@ static void fec_pin_init(int fecidx)if (fecidx ==0 ) {#if defined(CONFIG_ETHER_ON_FEC1 ) -#if defined(CONFIG_MPC885_FAMILY )/* MPC87x/88x have got 2 FECs and different pinout */ +#if defined(CONFIG_MPC885 )/* MPC87x/88x have got 2 FECs and different pinout */ #if !defined(CONFIG_RMII )
@@ -450,7 +450,7 @@ static void fec_pin_init(int fecidx)#if defined(CONFIG_ETHER_ON_FEC2 ) -#if defined(CONFIG_MPC885_FAMILY )/* MPC87x/88x have got 2 FECs and different pinout */ +#if defined(CONFIG_MPC885 )/* MPC87x/88x have got 2 FECs and different pinout */ #if !defined(CONFIG_RMII ) immr->im_cpm.cp_pepar |=0x0003fffc ;
@@ -475,7 +475,7 @@ static void fec_pin_init(int fecidx) immr->im_cpm.cp_cptr &= ~0x00000028 ;#endif /* CONFIG_RMII */ -#endif /* CONFIG_MPC885_FAMILY */ +#endif /* CONFIG_MPC885 */ #endif /* CONFIG_ETHER_ON_FEC2 */
arch/powerpc/include/asm/ppc.h +0 -5
@@ -15,11 +15,6 @@#if defined(CONFIG_8xx)#include <asm/8xx_immap.h> -#if defined(CONFIG_MPC866 ) -# define CONFIG_MPC866_FAMILY 1 -#elif defined(CONFIG_MPC885 ) -# define CONFIG_MPC885_FAMILY 1 -#endif #endif #ifdef CONFIG_MPC86xx#include <mpc86xx.h>
arch/powerpc/lib/Kconfig +1 -0
@@ -1,5 +1,6 @@ config CMD_IMMAP bool "Enable various commands to dump IMMR information" + depends on 8xx help This enables various commands such as:
arch/powerpc/lib/immap.c +0 -4
@@ -12,8 +12,6 @@#include <common.h> #include <command.h> -#if defined(CONFIG_8xx) -#include <asm/8xx_immap.h> #include <commproc.h> #include <asm/iopin_8xx.h>
@@ -560,5 +558,3 @@ U_BOOT_CMD("print MCC registers" ,"" ); - -#endif
drivers/i2c/soft_i2c.c +1 -1
@@ -28,7 +28,7 @@#include <asm/arch/gpio.h> #endif #endif -#if defined(CONFIG_MPC852T ) || defined(CONFIG_MPC866 ) +#if defined(CONFIG_8xx)#include <asm/io.h> #endif #include <i2c.h>
scripts/config_whitelist.txt +0 -11
@@ -17,7 +17,6 @@ CONFIG_8xx_CONS_SCCx CONFIG_8xx_CONS_SMC1 CONFIG_8xx_CONS_SMC2 CONFIG_8xx_CONS_SMCx -CONFIG_8xx_GCLK_FREQ CONFIG_A003399_NOR_WORKAROUND CONFIG_A008044_WORKAROUND CONFIG_ACADIA
@@ -1601,10 +1600,6 @@ CONFIG_MPC83XX_PCI2 CONFIG_MPC85XX_FEC CONFIG_MPC85XX_FEC_NAME CONFIG_MPC85XX_PCI2 -CONFIG_MPC866 -CONFIG_MPC866_FAMILY -CONFIG_MPC885 -CONFIG_MPC885_FAMILY CONFIG_MPC8XXX_SPI CONFIG_MPC8xxx_DISABLE_BPTR CONFIG_MPLL_FREQ
@@ -3083,7 +3078,6 @@ CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS CONFIG_SYS_DEFAULT_VIDEO_MODE CONFIG_SYS_DEF_EEPROM_ADDR -CONFIG_SYS_DER CONFIG_SYS_DEVICE_NULLDEV CONFIG_SYS_DFU_DATA_BUF_SIZE CONFIG_SYS_DFU_MAX_FILE_SIZE
@@ -4909,7 +4903,6 @@ CONFIG_SYS_PIOC_PPUDR_VAL CONFIG_SYS_PIOD_PDR_VAL1 CONFIG_SYS_PIOD_PPUDR_VAL CONFIG_SYS_PIO_MODE -CONFIG_SYS_PISCR CONFIG_SYS_PIT_BASE CONFIG_SYS_PIT_PRESCALE CONFIG_SYS_PIXIS_VBOOT_ENABLE
@@ -4931,7 +4924,6 @@ CONFIG_SYS_PLL_BYPASS CONFIG_SYS_PLL_FDR CONFIG_SYS_PLL_ODR CONFIG_SYS_PLL_SETTLING_TIME -CONFIG_SYS_PLPRCR CONFIG_SYS_PLUG_BASE CONFIG_SYS_PMAN CONFIG_SYS_PMC_BASE
@@ -5176,7 +5168,6 @@ CONFIG_SYS_SH_SDHI_NR_CHANNEL CONFIG_SYS_SICRH CONFIG_SYS_SICRL CONFIG_SYS_SIL1178_I2C -CONFIG_SYS_SIUMCR CONFIG_SYS_SJA1000_BASE CONFIG_SYS_SMALL_FLASH CONFIG_SYS_SMC0_CYCLE0_VAL
@@ -5254,11 +5245,9 @@ CONFIG_SYS_STATUS_OK CONFIG_SYS_STMICRO_BOOT CONFIG_SYS_SUPPORT_64BIT_DATA CONFIG_SYS_SXCNFG_VAL -CONFIG_SYS_SYPCR CONFIG_SYS_SYSTEMACE_BASE CONFIG_SYS_SYSTEMACE_WIDTH CONFIG_SYS_TBIPA_VALUE -CONFIG_SYS_TBSCR CONFIG_SYS_TCLK CONFIG_SYS_TEXT_ADDR CONFIG_SYS_TEXT_BASE_NOR
Signature · 1 line
2.12.0
PATCH 5/7 powerpc, 8xx: move FEC Ethernet driver in drivers/net
In reply to Christophe Leroy--- README | 15 ------ arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/cpu.c | 2 +- drivers/net/Kconfig | 58 ++++++++++++++++++++++ drivers/net/Makefile | 1 + .../cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c | 18 ------- scripts/config_whitelist.txt | 4 -- 7 files changed, 60 insertions(+), 39 deletions(-) rename arch/powerpc/cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c (98%)
README +0 -15
@@ -4083,21 +4083,6 @@ Low Level (hardware related) configuration options: Only for 83xx systems. If specified, then DDR should be configured using CS0 and CS1 instead of CS2 and CS3. -- CONFIG_ETHER_ON_FEC[12] - Define to enable FEC[12] on a 8xx series processor. - -- CONFIG_FEC[12]_PHY - Define to the hardcoded PHY address which corresponds - to the given FEC; i. e. - #define CONFIG_FEC1_PHY 4 - means that the PHY with address 4 is connected to FEC1 - - When set to -1, means to probe for first available. - -- CONFIG_FEC[12]_PHY_NORXERR - The PHY does not have a RXERR line (RMII only). - (so program the FEC to ignore it). - - CONFIG_RMII Enable RMII mode for all FECs. Note that this is a global option, we can't
arch/powerpc/cpu/mpc8xx/Makefile +0 -1
@@ -11,7 +11,6 @@ extra-y += start.o extra-y += traps.o obj-y += cpu.o obj-y += cpu_init.o -obj-y += fec.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-y += interrupts.o obj-$(CONFIG_CMD_REGINFO) += reginfo.o
arch/powerpc/cpu/mpc8xx/cpu.c +1 -1
@@ -347,7 +347,7 @@ void reset_8xx_watchdog (volatile immap_t * immr)*/ int cpu_eth_init (bd_t *bis) { -#if defined(FEC_ENET ) +#if defined(CONFIG_MPC8XX_FEC )fec_initialize (bis);#endif return 0 ;
drivers/net/Kconfig +58 -0
62 lines not on this page · raw message
drivers/net/Makefile +1 -0
@@ -38,6 +38,7 @@ obj-$(CONFIG_LAN91C96) += lan91c96.o obj-$(CONFIG_LPC32XX_ETH) += lpc32xx_eth.o obj-$(CONFIG_MACB) += macb.o obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o +obj-$(CONFIG_MPC8XX_FEC) += mpc8xx_fec.o obj-$(CONFIG_MVGBE) += mvgbe.o obj-$(CONFIG_MVNETA) += mvneta.o obj-$(CONFIG_MVPP2) += mvpp2.o
drivers/net/mpc8xx_fec.c renamed from arch/powerpc/cpu/mpc8xx/fec.c +0 -18
@@ -17,14 +17,6 @@ DECLARE_GLOBAL_DATA_PTR;#undef ET_DEBUG -#if defined(CONFIG_CMD_NET ) && \ - (defined(FEC_ENET ) || defined(CONFIG_ETHER_ON_FEC1 ) || defined(CONFIG_ETHER_ON_FEC2 )) - -/* compatibility test, if only FEC_ENET defined assume ETHER on FEC1 */ -#if defined(FEC_ENET ) && !defined(CONFIG_ETHER_ON_FEC1 ) && !defined(CONFIG_ETHER_ON_FEC2 ) -#define CONFIG_ETHER_ON_FEC1 1 -#endif -/* define WANT_MII when MII support is required */ #if defined(CONFIG_SYS_DISCOVER_PHY ) || defined(CONFIG_FEC1_PHY ) || defined(CONFIG_FEC2_PHY )#define WANT_MII
@@ -66,11 +58,7 @@ static struct ether_fcc_info_s {0 , offsetof(immap_t, im_cpm.cp_fec1), -#if defined(CONFIG_FEC1_PHY)CONFIG_FEC1_PHY , -#else - -1, /* discover */ -#endif-1 , 0,
@@ -80,11 +68,7 @@ static struct ether_fcc_info_s {1 , offsetof(immap_t, im_cpm.cp_fec2), -#if defined(CONFIG_FEC2_PHY )CONFIG_FEC2_PHY , -#else --1 , -#endif-1 , 0, },
@@ -929,5 +913,3 @@ int fec8xx_miiphy_write(struct mii_dev *bus, int addr, int devad, int reg, return 0; }#endif - -#endif
scripts/config_whitelist.txt +0 -4
@@ -739,8 +739,6 @@ CONFIG_ETHER_ON_FCC CONFIG_ETHER_ON_FCC1 CONFIG_ETHER_ON_FCC2 CONFIG_ETHER_ON_FCC3 -CONFIG_ETHER_ON_FEC1 -CONFIG_ETHER_ON_FEC2 CONFIG_ETHPRIME CONFIG_ETH_BUFSIZE CONFIG_ETH_RXSIZE
@@ -797,8 +795,6 @@ CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN CONFIG_FEATURE_SH_EXTRA_QUIET CONFIG_FEATURE_SH_FANCY_PROMPT CONFIG_FEATURE_SH_STANDALONE_SHELL -CONFIG_FEC1_PHY -CONFIG_FEC2_PHY CONFIG_FEC_ENET CONFIG_FEC_ENET_DEV CONFIG_FEC_FIXED_SPEED
Signature · 1 line
2.12.0
PATCH 5/7 powerpc, 8xx: move FEC Ethernet driver in drivers/net
Quoted 11 lines · Christophe Leroy
Signed-off-by Christophe Leroy <[email protected]>--- README | 15 ------ arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/cpu.c | 2 +- drivers/net/Kconfig | 58 ++++++++++++++++++++++ drivers/net/Makefile | 1 + .../cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c | 18 ------- scripts/config_whitelist.txt | 4 -- 7 files changed, 60 insertions(+), 39 deletions(-) rename arch/powerpc/cpu/mpc8xx/fec.c => drivers/net/mpc8xx_fec.c (98%)
PATCH 6/7 powerpc, 8xx: move SPI driver to drivers/spi/
In reply to Christophe Leroy--- arch/powerpc/cpu/mpc8xx/Makefile | 1 - drivers/spi/Kconfig | 6 ++++++ drivers/spi/Makefile | 1 + arch/powerpc/cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c | 3 --- 4 files changed, 7 insertions(+), 4 deletions(-) rename arch/powerpc/cpu/mpc8xx/spi.c => drivers/spi/mpc8xx_spi.c (99%)
arch/powerpc/cpu/mpc8xx/Makefile +0 -1
@@ -16,5 +16,4 @@ obj-y += interrupts.o obj-$(CONFIG_CMD_REGINFO) += reginfo.o obj-y += serial.o obj-y += speed.o -obj-y += spi.o obj-y += plprcr_write.o
drivers/spi/Kconfig +6 -0
@@ -223,4 +223,10 @@ config TI_QSPI Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms. This driver support spi flash single, quad and memory reads. +config MPC8XX_SPI + bool "MPC8XX SPI Driver" + depends on 8xx + help + Enable support for SPI on MPC8XX + endmenu # menu "SPI Support"
drivers/spi/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o obj-$(CONFIG_ICH_SPI) += ich.o obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o +obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o obj-$(CONFIG_MXC_SPI) += mxc_spi.o
drivers/spi/mpc8xx_spi.c renamed from arch/powerpc/cpu/mpc8xx/spi.c +0 -3
@@ -25,8 +25,6 @@#include <post.h> #include <serial.h> -#ifdef CONFIG_SPI -/* Warning: * You cannot enable DEBUG for early system initalization, i. e. when * this driver is used to read environment parameters like "baudrate"
@@ -421,4 +419,3 @@ ssize_t spi_xfer (size_t count)return count; } -#endif /* CONFIG_SPI */
Signature · 1 line
2.12.0
PATCH 7/7 powerpc, 8xx: move Serial driver to drivers/serial/
In reply to Christophe Leroy--- README | 19 ------ arch/powerpc/cpu/mpc8xx/Makefile | 1 - drivers/serial/Kconfig | 72 ++++++++++++++++++++++ drivers/serial/Makefile | 1 + .../serial.c => drivers/serial/serial_mpc8xx.c | 15 ----- scripts/config_whitelist.txt | 9 --- 6 files changed, 73 insertions(+), 44 deletions(-) rename arch/powerpc/cpu/mpc8xx/serial.c => drivers/serial/serial_mpc8xx.c (97%)
README +0 -19
@@ -691,29 +691,10 @@ The following options need to be configured: Define this variable to enable hw flow control in serial driver. Current user of this option is drivers/serial/nsl16550.c driver -- Console Interface: - Depending on board, define exactly one serial port - (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2, - CONFIG_8xx_CONS_SCC1, ...), or switch off the serial - console by defining CONFIG_8xx_CONS_NONE - - Note: if CONFIG_8xx_CONS_NONE is defined, the serial - port routines must be defined elsewhere - (i.e. serial_init(), serial_getc(), ...) - - Console Baudrate: CONFIG_BAUDRATE - in bps Select one of the baudrates listed in CONFIG_SYS_BAUDRATE_TABLE, see below. - CONFIG_SYS_BRGCLK_PRESCALE, baudrate prescale - -- Console Rx buffer length - With CONFIG_SYS_SMC_RXBUFLEN it is possible to define - the maximum receive buffer length for the SMC. - This option is actual only for 8xx possible. - If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE - must be defined, to setup the maximum idle timeout for - the SMC. - Autoboot Command: CONFIG_BOOTCOMMAND
arch/powerpc/cpu/mpc8xx/Makefile +0 -1
@@ -14,6 +14,5 @@ obj-y += cpu_init.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-y += interrupts.o obj-$(CONFIG_CMD_REGINFO) += reginfo.o -obj-y += serial.o obj-y += speed.o obj-y += plprcr_write.o
drivers/serial/Kconfig +72 -0
76 lines not on this page · raw message
drivers/serial/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_STM32X7_SERIAL) += serial_stm32x7.o obj-$(CONFIG_BCM283X_MU_SERIAL) += serial_bcm283x_mu.o obj-$(CONFIG_MSM_SERIAL) += serial_msm.o obj-$(CONFIG_MVEBU_A3700_UART) += serial_mvebu_a3700.o +obj-$(CONFIG_MPC8XX_CONS) += serial_mpc8xx.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_USB_TTY) += usbtty.o
drivers/serial/serial_mpc8xx.c renamed from arch/powerpc/cpu/mpc8xx/serial.c +0 -15
@@ -14,8 +14,6 @@DECLARE_GLOBAL_DATA_PTR ; -#if !defined(CONFIG_8xx_CONS_NONE)/* No Console at all */ -#if defined(CONFIG_8xx_CONS_SMC1)/* Console on SMC1 */ #define SMC_INDEX 0#define PROFF_SMC PROFF_SMC1
@@ -50,15 +48,6 @@ DECLARE_GLOBAL_DATA_PTR;#endif /* CONFIG_8xx_CONS_SCCx */ -#if !defined(CONFIG_SYS_SMC_RXBUFLEN ) -#define CONFIG_SYS_SMC_RXBUFLEN 1 -#define CONFIG_SYS_MAXIDLE 0 -#else -#if !defined(CONFIG_SYS_MAXIDLE ) -#error "you must define CONFIG_SYS_MAXIDLE" -#endif -#endif - typedef volatile struct serialbuffer { cbd_t rxbd; /* Rx BD */ cbd_t txbd; /* Tx BD */
@@ -76,9 +65,7 @@ static void serial_setdivisor(volatile cpm8xx_t *cp) divisor=(50 *1000 *1000 +8 *9600 )/16 /9600 ; } -#ifdef CONFIG_SYS_BRGCLK_PRESCALE divisor /=CONFIG_SYS_BRGCLK_PRESCALE ; -#endif if (divisor<=0x1000 ) { cp->cp_brgc1=((divisor-1 )<<1 ) |CPM_BRG_EN ;
@@ -560,5 +547,3 @@ void mpc8xx_serial_initialize(void)serial_register (&serial_scc_device);#endif } - -#endif /* CONFIG_8xx_CONS_NONE */
scripts/config_whitelist.txt +0 -9
@@ -12,11 +12,6 @@ CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES CONFIG_83XX_PCICLK CONFIG_83XX_PCI_STREAMING CONFIG_88F5182 -CONFIG_8xx_CONS_NONE -CONFIG_8xx_CONS_SCCx -CONFIG_8xx_CONS_SMC1 -CONFIG_8xx_CONS_SMC2 -CONFIG_8xx_CONS_SMCx CONFIG_A003399_NOR_WORKAROUND CONFIG_A008044_WORKAROUND CONFIG_ACADIA
@@ -2660,7 +2655,6 @@ CONFIG_SYS_BR6_64M CONFIG_SYS_BR6_8M CONFIG_SYS_BR6_PRELIM CONFIG_SYS_BR7_PRELIM -CONFIG_SYS_BRGCLK_PRESCALE CONFIG_SYS_BUSCLK CONFIG_SYS_CACHELINE_SHIFT CONFIG_SYS_CACHE_ACR0
@@ -5087,7 +5081,6 @@ CONFIG_SYS_SDIO_BASE0 CONFIG_SYS_SDIO_BASE1 CONFIG_SYS_SDIO_BASE2 CONFIG_SYS_SDIO_BASE3 -CONFIG_SYS_SDMR CONFIG_SYS_SDRAM CONFIG_SYS_SDRAM1 CONFIG_SYS_SDRAM_BANKS
@@ -5136,7 +5129,6 @@ CONFIG_SYS_SDRC_MR_VAL5 CONFIG_SYS_SDRC_TR_VAL CONFIG_SYS_SDRC_TR_VAL1 CONFIG_SYS_SDRC_TR_VAL2 -CONFIG_SYS_SDSR CONFIG_SYS_SD_VOLTAGE CONFIG_SYS_SEC_MON_ADDR CONFIG_SYS_SEC_MON_OFFSET
@@ -5171,7 +5163,6 @@ CONFIG_SYS_SMC0_MODE0_VAL CONFIG_SYS_SMC0_PULSE0_VAL CONFIG_SYS_SMC0_SETUP0_VAL CONFIG_SYS_SMC_CSR0_VAL -CONFIG_SYS_SMC_RXBUFLEN CONFIG_SYS_SMI_BASE CONFIG_SYS_SPANSION_BASE CONFIG_SYS_SPANSION_BOOT
Signature · 1 line
2.12.0