pmic: dialog: Avoid name conflicts
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/3 pmic: dialog: Avoid name conflicts
From: Fabio Estevam <[email protected]>
As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC, we need to be able to build both drivers.
Change pmic_init() and PMIC_NUM_OF_REGS names to avoid build conflicts when both drivers are present.
--- board/freescale/mx53loco/mx53loco.c | 2 +- drivers/misc/pmic_dialog.c | 4 ++-- include/dialog_pmic.h | 2 +- include/pmic.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-)
board/freescale/mx53loco/mx53loco.c +1 -1
@@ -322,7 +322,7 @@ static int power_init(void)unsigned int val, ret;struct pmic *p; -pmic_init (); +pmic_dialog_init (); p =get_pmic ();/* Set VDDA to 1.25V */
drivers/misc/pmic_dialog.c +2 -2
@@ -20,13 +20,13 @@#include <pmic.h> #include <dialog_pmic.h> -int pmic_init (void ) +int pmic_dialog_init (void ) {struct pmic *p =get_pmic ();static const char name[] ="DIALOG_PMIC" ; p->name = name; - p->number_of_regs =PMIC_NUM_OF_REGS ; + p->number_of_regs =DIALOG_NUM_OF_REGS ; p->interface =PMIC_I2C ; p->hw.i2c.addr =CONFIG_SYS_DIALOG_PMIC_I2C_ADDR ;
include/dialog_pmic.h +1 -1
@@ -164,7 +164,7 @@ enum {DA9053_GPID7_REG ,DA9053_GPID8_REG ,DA9053_GPID9_REG , - PMIC_NUM_OF_REGS, + DIALOG_NUM_OF_REGS, };#define DA_BUCKCORE_VBCORE_1_250V 0x1E
include/pmic.h +1 -0
@@ -55,6 +55,7 @@ struct pmic { };int pmic_init (void ); +int pmic_dialog_init (void );int check_reg (u32 reg);struct pmic *get_pmic (void );int pmic_probe (struct pmic *p);
Signature · 1 line
1.7.1
Fabio Estevam
reviewerPATCH 2/4 mx53loco: Add mc34708 support and set mx53 frequency at 1GHz
From: Fabio Estevam <[email protected]>
Add mc34708 support and set mx53 core frequency at its maximum value of 1GHz.
--- board/freescale/mx53loco/mx53loco.c | 52 +++++++++++++++++++++++++--------- include/configs/mx53loco.h | 2 + include/fsl_pmic.h | 10 +++++++ 3 files changed, 50 insertions(+), 14 deletions(-)
board/freescale/mx53loco/mx53loco.c +38 -14
@@ -38,6 +38,7 @@#include <asm/gpio.h> #include <pmic.h> #include <dialog_pmic.h> +#include <fsl_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -319,23 +320,46 @@ static void setup_iomux_i2c(void)static int power_init (void ) { -unsigned int val, ret; +unsigned int val; +int ret =-1 ;struct pmic *p; -pmic_dialog_init (); - p =get_pmic (); - -/* Set VDDA to 1.25V */ - val =DA9052_BUCKCORE_BCOREEN |DA_BUCKCORE_VBCORE_1_250V ; - ret =pmic_reg_write (p,DA9053_BUCKCORE_REG , val); - - ret |=pmic_reg_read (p,DA9053_SUPPLY_REG , &val); - val |=DA9052_SUPPLY_VBCOREGO ; - ret |=pmic_reg_write (p,DA9053_SUPPLY_REG , val); +if (!i2c_probe (CONFIG_SYS_DIALOG_PMIC_I2C_ADDR )) { +pmic_dialog_init (); + p =get_pmic (); + +/* Set VDDA to 1.25V */ + val =DA9052_BUCKCORE_BCOREEN |DA_BUCKCORE_VBCORE_1_250V ; + ret =pmic_reg_write (p,DA9053_BUCKCORE_REG , val); + + ret |=pmic_reg_read (p,DA9053_SUPPLY_REG , &val); + val |=DA9052_SUPPLY_VBCOREGO ; + ret |=pmic_reg_write (p,DA9053_SUPPLY_REG , val); + +/* Set Vcc peripheral to 1.30V */ + ret |=pmic_reg_write (p,DA9053_BUCKPRO_REG ,0x62 ); + ret |=pmic_reg_write (p,DA9053_SUPPLY_REG ,0x62 ); + } -/* Set Vcc peripheral to 1.35V */ - ret |=pmic_reg_write (p,DA9053_BUCKPRO_REG ,0x62 ); - ret |=pmic_reg_write (p,DA9053_SUPPLY_REG ,0x62 ); +if (!i2c_probe (CONFIG_SYS_FSL_PMIC_I2C_ADDR )) { +pmic_init (); + p =get_pmic (); + +/* Set VDDGP to 1.25V for 1GHz on SW1 */ +pmic_reg_read (p,REG_SW_0 , &val); + val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708; + ret =pmic_reg_write (p,REG_SW_0 , val); + +/* Set VCC as 1.30V on SW2 */ +pmic_reg_read (p,REG_SW_1 , &val); + val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708; + ret |=pmic_reg_write (p,REG_SW_1 , val); + +/* Set global reset timer to 4s */ +pmic_reg_read (p,REG_POWER_CTL2 , &val); + val = (val & ~TIMER_MASK_MC34708 ) |TIMER_4S_MC34708 ; + ret |=pmic_reg_write (p,REG_POWER_CTL2 , val); + }return ret; }
include/configs/mx53loco.h +2 -0
@@ -97,7 +97,9 @@#define CONFIG_PMIC #define CONFIG_PMIC_I2C #define CONFIG_DIALOG_PMIC +#define CONFIG_PMIC_FSL #define CONFIG_SYS_DIALOG_PMIC_I2C_ADDR 0x48 +#define CONFIG_SYS_FSL_PMIC_I2C_ADDR 0x8/* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE
include/fsl_pmic.h +10 -0
@@ -122,4 +122,14 @@ enum {/* Interrupt status 1 */ #define RTCRSTI (1 << 7) +/* MC34708 Definitions */ +#define SWx_VOLT_MASK_MC34708 0x3F +#define SWx_1_250V_MC34708 0x30 +#define SWx_1_300V_MC34708 0x34 +#define TIMER_MASK_MC34708 0x300 +#define TIMER_4S_MC34708 0x100 +#define VUSBSEL_MC34708 (1 << 2) +#define VUSBEN_MC34708 (1 << 3) +#define SWBST_CTRL 31 +#endif
Signature · 1 line
1.7.1
PATCH 2/4 mx53loco: Add mc34708 support and set mx53 frequency at 1GHz
Quoted 8 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Tuesday, May 08, 2012 4:26 AM
To: u-boot at lists.denx.de
Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
Subject: [PATCH 2/4] mx53loco: Add mc34708 support and set mx53 frequency at 1GHz
Quoted 6 lines
From: Fabio Estevam <[email protected]>
Add mc34708 support and set mx53 core frequency at its maximum value of 1GHz.
Signed-off-by Fabio Estevam <[email protected]>
Quoted 119 lines
---
board/freescale/mx53loco/mx53loco.c| 52 +++++++++++++++++++++++++---
------include/configs/mx53loco.h| 2 +include/fsl_pmic.h| 10 +++++++3 files changed, 50 insertions(+), 14 deletions(-)board/freescale/mx53loco/mx53loco.c +38
-14@@ -38,6 +38,7 @@#include <asm/gpio.h> #include <pmic.h> #include <dialog_pmic.h> +#include <fsl_pmic.h> DECLARE_GLOBAL_DATA_PTR ;@@ -319,23 +320,46 @@ static void setup_iomux_i2c(void)static int power_init (void ) { -unsigned int val, ret; +unsigned int val; +int ret =-1 ;struct pmic *p; -pmic_dialog_init (); - p =get_pmic (); - -/* Set VDDA to 1.25V */ - val =DA9052_BUCKCORE_BCOREEN |DA_BUCKCORE_VBCORE_1_250V ; - ret =pmic_reg_write (p,DA9053_BUCKCORE_REG , val); - - ret |=pmic_reg_read (p,DA9053_SUPPLY_REG , &val); - val |=DA9052_SUPPLY_VBCOREGO ; - ret |=pmic_reg_write (p,DA9053_SUPPLY_REG , val); +if (!i2c_probe (CONFIG_SYS_DIALOG_PMIC_I2C_ADDR )) { +pmic_dialog_init (); + p =get_pmic (); + +/* Set VDDA to 1.25V */ + val =DA9052_BUCKCORE_BCOREEN |DA_BUCKCORE_VBCORE_1_250V ; + ret =pmic_reg_write (p,DA9053_BUCKCORE_REG , val); + + ret |=pmic_reg_read (p,DA9053_SUPPLY_REG , &val); + val |=DA9052_SUPPLY_VBCOREGO ; + ret |=pmic_reg_write (p,DA9053_SUPPLY_REG , val); + +/* Set Vcc peripheral to 1.30V */ + ret |=pmic_reg_write (p,DA9053_BUCKPRO_REG ,0x62 ); + ret |=pmic_reg_write (p,DA9053_SUPPLY_REG ,0x62 ); + } -/* Set Vcc peripheral to 1.35V */ - ret |=pmic_reg_write (p,DA9053_BUCKPRO_REG ,0x62 ); - ret |=pmic_reg_write (p,DA9053_SUPPLY_REG ,0x62 ); +if (!i2c_probe (CONFIG_SYS_FSL_PMIC_I2C_ADDR )) { +pmic_init (); + p =get_pmic (); + +/* Set VDDGP to 1.25V for 1GHz on SW1 */ +pmic_reg_read (p,REG_SW_0 , &val); + val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708; + ret =pmic_reg_write (p,REG_SW_0 , val); + +/* Set VCC as 1.30V on SW2 */ +pmic_reg_read (p,REG_SW_1 , &val); + val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708; + ret |=pmic_reg_write (p,REG_SW_1 , val); + +/* Set global reset timer to 4s */ +pmic_reg_read (p,REG_POWER_CTL2 , &val); + val = (val & ~TIMER_MASK_MC34708 ) |TIMER_4S_MC34708 ; + ret |=pmic_reg_write (p,REG_POWER_CTL2 , val); + }return ret; }include/configs/mx53loco.h index renamed from include/configs/mx53loco.h +0
-08f43eec..87f6ed1 100644
include/configs/mx53loco.h +2
-0@@ -97,7 +97,9 @@#define CONFIG_PMIC #define CONFIG_PMIC_I2C #define CONFIG_DIALOG_PMIC +#define CONFIG_PMIC_FSL #define CONFIG_SYS_DIALOG_PMIC_I2C_ADDR 0x48 +#define CONFIG_SYS_FSL_PMIC_I2C_ADDR 0x8 /* allow to overwrite serial and ethaddr */ #define
CONFIG_ENV_OVERWRITEdiff --gita/include/fsl_pmic.hb/include/fsl_pmic.hindex 742f2e1..3b7cd37 100644include/fsl_pmic.h +10
-1@@ -122,4 +122,14 @@ enum {/* Interrupt status 1 */ #define RTCRSTI (1 << 7) +/* MC34708 Definitions */ +#define SWx_VOLT_MASK_MC34708 0x3F +#define SWx_1_250V_MC34708 0x30 +#define SWx_1_300V_MC34708 0x34 +#define TIMER_MASK_MC34708 0x300 +#define TIMER_4S_MC34708 0x100 +#define VUSBSEL_MC34708 (1 << 2) +#define VUSBEN_MC34708 (1 << 3) +#define SWBST_CTRL 31 +#endif --1.7.1
PATCH 2/4 mx53loco: Add mc34708 support and set mx53 frequency at 1GHz
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add mc34708 support and set mx53 core frequency at its maximum value of 1GHz.
Signed-off-by Fabio Estevam <[email protected]>---
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/4 mx53loco: Add mc34708 support and set mx53 frequency at 1GHz
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add mc34708 support and set mx53 core frequency at its maximum value of 1GHz.
Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Fabio Estevam
reviewerPATCH 3/4 mx53loco: Turn on VUSB regulator
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator so that the mx53 USBH1 PHY receives the 3.3V voltage.
Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the commands:
usb start
usb info
,which correctly detected and printed the USB pen drive information.
--- board/freescale/mx53loco/mx53loco.c | 9 +++++++++ include/fsl_pmic.h | 1 + 2 files changed, 10 insertions(+), 0 deletions(-)
board/freescale/mx53loco/mx53loco.c +9 -0
@@ -359,6 +359,15 @@ static int power_init(void)pmic_reg_read (p,REG_POWER_CTL2 , &val); val = (val & ~TIMER_MASK_MC34708 ) |TIMER_4S_MC34708 ; ret |=pmic_reg_write (p,REG_POWER_CTL2 , val); + +/* Set VUSBSEL and VUSBEN for USB PHY supply*/ +pmic_reg_read (p,REG_MODE_0 , &val); + val |= (VUSBSEL_MC34708 |VUSBEN_MC34708 ); + ret |=pmic_reg_write (p,REG_MODE_0 , val); + +/* Set SWBST to 5V in auto mode */ + val =SWBST_AUTO ; + ret |=pmic_reg_write (p,SWBST_CTRL , val); }return ret;
include/fsl_pmic.h +1 -0
@@ -131,5 +131,6 @@ enum {#define VUSBSEL_MC34708 (1 << 2)#define VUSBEN_MC34708 (1 << 3)#define SWBST_CTRL 31 +#define SWBST_AUTO 0x8#endif
Signature · 1 line
1.7.1
PATCH 3/4 mx53loco: Turn on VUSB regulator
Quoted 16 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Tuesday, May 08, 2012 4:26 AM
To: u-boot at lists.denx.de
Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
Subject: [PATCH 3/4] mx53loco: Turn on VUSB regulatorFrom: Fabio Estevam <[email protected]>
On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator so that the mx53 USBH1 PHY receives the 3.3V voltage.
Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the
commands:
Quoted 7 lines
usb start
usb info
,which correctly detected and printed the USB pen drive information.
Signed-off-by Fabio Estevam <[email protected]>
Quoted 40 lines
---
board/freescale/mx53loco/mx53loco.c | 9 +++++++++ include/fsl_pmic.h | 1 + 2 files changed, 10 insertions(+), 0 deletions(-)board/freescale/mx53loco/mx53loco.c +9
-0@@ -359,6 +359,15 @@ static int power_init(void)pmic_reg_read (p,REG_POWER_CTL2 , &val); val = (val & ~TIMER_MASK_MC34708 ) |TIMER_4S_MC34708 ; ret |=pmic_reg_write (p,REG_POWER_CTL2 , val); + +/* Set VUSBSEL and VUSBEN for USB PHY supply*/ +pmic_reg_read (p,REG_MODE_0 , &val); + val |= (VUSBSEL_MC34708 |VUSBEN_MC34708 ); + ret |=pmic_reg_write (p,REG_MODE_0 , val); + +/* Set SWBST to 5V in auto mode */ + val =SWBST_AUTO ; + ret |=pmic_reg_write (p,SWBST_CTRL , val); }return ret;include/fsl_pmic.h index 3b7cd37..64c1e2e renamed from include/fsl_pmic.h +0
-0100644
include/fsl_pmic.h +1
-1@@ -131,5 +131,6 @@ enum {#define VUSBSEL_MC34708 (1 << 2)#define VUSBEN_MC34708 (1 << 3)#define SWBST_CTRL 31 +#define SWBST_AUTO 0x8#endif --1.7.1
PATCH 3/4 mx53loco: Turn on VUSB regulator
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator so that the mx53 USBH1 PHY receives the 3.3V voltage.
Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the commands:
Quoted 8 lines
usb start
usb info
,which correctly detected and printed the USB pen drive information.
Signed-off-by Fabio Estevam <[email protected]>---
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/4 mx53loco: Turn on VUSB regulator
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator so that the mx53 USBH1 PHY receives the 3.3V voltage.
Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the commands:
Quoted 8 lines
usb start
usb info
,which correctly detected and printed the USB pen drive information.
Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Fabio Estevam
reviewerPATCH 4/4 mx53loco: Add CONFIG_REVISION_TAG
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG information.
The kernel uses this data to distinguish between Dialog versus mc34708 based boards, and also to distinguish between revA and revB of the mc34708 based boards.
--- board/freescale/mx53loco/mx53loco.c | 7 +++++++ include/configs/mx53loco.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)
board/freescale/mx53loco/mx53loco.c +7 -0
@@ -62,6 +62,13 @@ void dram_init_banksize(void) gd->bd->bi_dram[1 ].size =PHYS_SDRAM_2_SIZE ; } +u32 get_board_rev (void ) +{ +/* TODO: Convert the register to proper io accessor */ +int rev =readl (IIM_BASE_ADDR +0x878 ); +return (get_cpu_rev () & ~(0xF <<8 )) | (rev &0xF ) <<8 ; +} +static void setup_iomux_uart (void ) {/* UART1 RXD */
include/configs/mx53loco.h +1 -0
@@ -43,6 +43,7 @@#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO +#define CONFIG_REVISION_TAG #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART1_BASE
Signature · 1 line
1.7.1
PATCH v2 4/4 mx53loco: Add CONFIG_REVISION_TAG
FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG information.
The kernel uses this data to distinguish between Dialog versus mc34708 based boards, and also to distinguish between revA and revB of the mc34708 based boards.
---
Changes since v1:
- Use proper io accessor for reading board revision
arch/arm/include/asm/arch-mx5/imx-regs.h | 5 +++++ board/freescale/mx53loco/mx53loco.c | 12 ++++++++++++ include/configs/mx53loco.h | 1 + 3 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-mx5/imx-regs.h +5 -0
@@ -491,6 +491,11 @@ struct iim_regs { } bank[4 ]; }; +struct fuse_bank0_regs { +u32 fuse0_23[24 ]; +u32 gp[8 ]; +}; +struct fuse_bank1_regs {u32 fuse0_8[9 ];u32 mac_addr[6 ];
board/freescale/mx53loco/mx53loco.c +12 -0
@@ -62,6 +62,18 @@ void dram_init_banksize(void) gd->bd->bi_dram[1 ].size =PHYS_SDRAM_2_SIZE ; } +u32 get_board_rev (void ) +{ +struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE ; +struct fuse_bank *bank = &iim->bank[0 ]; +struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank->fuse_regs; + +int rev =readl (&fuse->gp[6 ]); + +return (get_cpu_rev () & ~(0xF <<8 )) | (rev &0xF ) <<8 ; +} +static void setup_iomux_uart (void ) {/* UART1 RXD */
include/configs/mx53loco.h +1 -0
@@ -43,6 +43,7 @@#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO +#define CONFIG_REVISION_TAG #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART1_BASE
Signature · 1 line
1.7.1
PATCH v2 4/4 mx53loco: Add CONFIG_REVISION_TAG
Quoted 8 lines · Fabio Estevam
FSL 2.6.35 kernel assumes that the bootloader passes the
CONFIG_REVISION_TAGinformation.The kernel uses this data to distinguish between Dialog versus mc34708 based boards, and also to distinguish between revA and revB of the mc34708 based boards.
Suggested-by Yu Li <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 4/4 mx53loco: Add CONFIG_REVISION_TAG
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
FSL 2.6.35 kernel assumes that the bootloader passes the
CONFIG_REVISION_TAGinformation.The kernel uses this data to distinguish between Dialog versus mc34708 based boards, and also to distinguish between revA and revB of the mc34708 based boards.
Suggested-by Yu Li <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 4/4 mx53loco: Add CONFIG_REVISION_TAG
In reply to Fabio EstevamQuoted 29 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Tuesday, May 08, 2012 4:26 AM
To: u-boot at lists.denx.de
Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
Subject: [PATCH 4/4] mx53loco: AddCONFIG_REVISION_TAGFrom: Fabio Estevam <[email protected]>
FSL 2.6.35 kernel assumes that the bootloader passes the
CONFIG_REVISION_TAGinformation.The kernel uses this data to distinguish between Dialog versus mc34708 based boards, and also to distinguish between revA and revB of the mc34708 based boards.
Suggested-by Yu Li <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
board/freescale/mx53loco/mx53loco.c | 7 +++++++ include/configs/mx53loco.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)board/freescale/mx53loco/mx53loco.c +0
-0
board/freescale/mx53loco/mx53loco.c void dram_init_banksize(void) · line 69
Quoted 8 lines
board/freescale/mx53loco/mx53loco.c +6
-0@@ -62,6 +62,13 @@ void dram_init_banksize(void) gd->bd->bi_dram[1 ].size =PHYS_SDRAM_2_SIZE ; } +u32 get_board_rev (void ) +{ +/* TODO: Convert the register to proper io accessor */ +int rev =readl (IIM_BASE_ADDR +0x878 ); +return (get_cpu_rev () & ~(0xF <<8 )) | (rev &0xF ) <<8 ; } +
As you said, could you please use accessor for it?
Quoted 18 lines
board/freescale/mx53loco/mx53loco.c +0
-0static void setup_iomux_uart (void ) {/* UART1 RXD */ include/configs/mx53loco.h index renamed from include/configs/mx53loco.h +0
-087f6ed1..eab0e27 100644
include/configs/mx53loco.h +1
-1@@ -43,6 +43,7 @@#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO +#define CONFIG_REVISION_TAG #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART1_BASE --1.7.1
Fabio Estevam
reviewerPATCH 4/4 mx53loco: Add CONFIG_REVISION_TAG
Quoted 1 line · On Wed, May 9, 2012 at 6:15 AM, Liu Hui-R64343 <[email protected]> wrote:
As you said, could you please use accessor for it?
Yes, I did it in v2:
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=b9e28549a2b5c8a2d7d6d6238bd0a64e5730c7cc;hp=9b07d877120f9d1a575df14a101966e04867d0b7
A message that is not in the archive (sent off-list or not yet received): AD13664F485EE54694E29A7F9D5BE1AF1898C2@039-SN2MPN1-022.039d.mgd.msft.net
PATCH 4/4 mx53loco: Add CONFIG_REVISION_TAG
Quoted 10 lines · On 09/05/2012 13:41, Liu Hui-R64343 wrote:
Quoted 10 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Wednesday, May 09, 2012 7:21 PM
To: Liu Hui-R64343
Cc: u-boot at lists.denx.de; sbabic at denx.de; Estevam Fabio-R49496
Subject: Re: [PATCH 4/4] mx53loco: AddCONFIG_REVISION_TAGOn Wed, May 9, 2012 at 6:15 AM, Liu Hui-R64343 <[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
As you said, could you please use accessor for it?
Yes, I did it in v2:
http://git.denx.de/?p=u-boot/u-boot-
imx.git;a=commitdiff;h=b9e28549a2b5c8a2d7d6d6238bd0a64e5730c7cc;hp=9b07d877120f9d1a575df14a101966e04867d0b7OK, Stefano, you may need pick up this v2 patch.
This is was I already did - V2 is on u-boot-imx
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/3 pmic: dialog: Avoid name conflicts
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC, we need to be able to build both drivers.
Change
pmic_init()andPMIC_NUM_OF_REGSnames to avoid build conflicts when both drivers are present.Signed-off-by Fabio Estevam <[email protected]>---
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/3 pmic: dialog: Avoid name conflicts
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC, we need to be able to build both drivers.
Change
pmic_init()andPMIC_NUM_OF_REGSnames to avoid build conflicts when both drivers are present.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================