assorted fixes, mainly at91 related
Subsystems (8)
cover assorted fixes, mainly at91 related
While working on enabling DT support for at91sam9263ek I have stumbled over a fev issues that are all fixed in the following patches.
Some of the issues may only be relevant when we have more at91 boards supporting DT.
None of the fixes are critical and are thus mainly -next material.
Sam
Sam Ravnborg (6):
arm: at91 bootstrap: declare local function static
macb: fix clock probing with DT
clk: at91: fix clk-main
pinctrl: at91: move initcalls to postcore_initcall
mci: atmel_mci: fix devinfo DEV with OF enabled
atmel_lcdfb: fix so the correct guard_time is used
arch/arm/mach-at91/bootstrap.c | 2 +- drivers/clk/at91/clk-main.c | 1 + drivers/mci/atmel_mci.c | 3 +-- drivers/net/macb.c | 4 ++-- drivers/pinctrl/pinctrl-at91.c | 4 ++-- drivers/video/atmel_lcdfb.c | 2 +- drivers/video/atmel_lcdfb_core.c | 1 + 7 files changed, 9 insertions(+), 8 deletions(-)
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/6 arm: at91 bootstrap: declare local function static
From: Sam Ravnborg <[email protected]>
Function is only used in this file and no prototype exist in any header.
--- arch/arm/mach-at91/bootstrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/bootstrap.c +1 -1
@@ -149,7 +149,7 @@ static void boot_reset_action(struct menu *m, struct menu_entry *me)restart_machine (); } -void at91_bootstrap_menu (void ) +static void at91_bootstrap_menu (void ) {struct menu *m;struct menu_entry *me;
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/6 macb: fix clock probing with DT
In reply to Sam RavnborgWith DT enabled the following was logged:
macb fffbc000.ethernet: no macb_clk
macb fffbc000.ethernet: probe failed: Invalid argument
The clock probed was with the name used in a non-DT setup. Fix so we use a proper name ("pclk") with DT, and keep current fuctionality without DT.
--- drivers/net/macb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/macb.c +2 -2
@@ -666,7 +666,7 @@ static int macb_probe(struct device_d *dev) macb->miibus.dev.device_node = mdiobus; macb->phy_addr =-1 ; - pclk_name =NULL ; + pclk_name ="pclk" ; }else {dev_err (dev,"macb: no platform_data\n" );return -ENODEV ;
@@ -681,7 +681,7 @@ static int macb_probe(struct device_d *dev)* Do some basic initialization so that we at least can talk * to the PHY */ - macb->pclk =clk_get (dev,"macb_clk" ); + macb->pclk =clk_get (dev, pclk_name);if (IS_ERR (macb->pclk)) {dev_err (dev,"no macb_clk\n" );return PTR_ERR (macb->pclk);
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/6 clk: at91: fix clk-main
In reply to Sam RavnborgFollowing warning was reported during boot with
at91sam9263ek with DT enabled.
"Main crystal frequency not set, using approximate value"
This occured due to a missing parent in clk_rm9200_main.
--- drivers/clk/at91/clk-main.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/at91/clk-main.c +1 -0
@@ -391,6 +391,7 @@ at91_clk_register_rm9200_main(struct regmap *regmap, clkmain =xzalloc (sizeof (*clkmain)); + clkmain->parent = parent_name; clkmain->clk.name = name; clkmain->clk.ops = &rm9200_main_ops; clkmain->clk.parent_names = &clkmain->parent;
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/6 pinctrl: at91: move initcalls to postcore_initcall
In reply to Sam RavnborgMove initcalls to postcore_initcall() like all other pinctrl drivers. This will init this driver earlier right after pinctrl driver.
No know bugs are fixed by this change.
--- drivers/pinctrl/pinctrl-at91.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/pinctrl-at91.c +2 -2
@@ -538,7 +538,7 @@ static int at91_pinctrl_init(void) {return platform_driver_register (&at91_pinctrl_driver); } -coredevice_initcall (at91_pinctrl_init); +postcore_initcall (at91_pinctrl_init);static int at91_gpio_get (struct gpio_chip *chip,unsigned offset) {
@@ -718,4 +718,4 @@ static int at91_gpio_init(void) {return platform_driver_register (&at91_gpio_driver); } -coredevice_initcall (at91_gpio_init); +postcore_initcall (at91_gpio_init);
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/6 mci: atmel_mci: fix devinfo DEV with OF enabled
In reply to Sam Ravnborgdevinfo DEV resulted in a NULL pointer expection. As platform_data is only valid in non-DT setup, fix this so we no longer reference platform_data outside the probe function
--- drivers/mci/atmel_mci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mci/atmel_mci.c +1 -2
@@ -474,7 +474,6 @@ static int atmci_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci_dstatic void atmci_info (struct device_d *mci_dev) {struct atmel_mci *host = mci_dev->priv; -struct atmel_mci_platform_data *pd = host->hw_dev->platform_data;printf (" Bus data width: %d bit\n" , host->mci.bus_width);
@@ -490,7 +489,7 @@ static void atmci_info(struct device_d *mci_dev)printf ("- %u Hz upper limit" , host->mci.f_max);printf ("\n Card detection support: %s\n" , -gpio_is_valid (pd->detect_pin) ?"yes" :"no" ); +gpio_is_valid (host->detect_pin) ?"yes" :"no" ); }/*
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/6 atmel_lcdfb: fix so the correct guard_time is used
In reply to Sam Ravnborgguard_time is set in platform data but was never copied to atmel_lcdfb_info thus a guard_time of 0 have always been used.
This issue was found during code inspection and no know bugs is fixed by this.
--- drivers/video/atmel_lcdfb.c | 2 +- drivers/video/atmel_lcdfb_core.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/video/atmel_lcdfb.c +1 -1
@@ -85,7 +85,7 @@ static void atmel_lcdfb_start(struct atmel_lcdfb_info *sinfo)lcdc_writel (sinfo,ATMEL_LCDC_DMACON , pdata->default_dmacon);lcdc_writel (sinfo,ATMEL_LCDC_PWRCON , - (pdata->guard_time <<ATMEL_LCDC_GUARDT_OFFSET ) + (sinfo->guard_time <<ATMEL_LCDC_GUARDT_OFFSET ) |ATMEL_LCDC_PWR ); }
drivers/video/atmel_lcdfb_core.c +1 -0
@@ -258,6 +258,7 @@ int atmel_lcdc_register(struct device_d *dev, struct atmel_lcdfb_devdata *data) sinfo =xzalloc (sizeof (*sinfo)); sinfo->pdata = pdata; + sinfo->guard_time = pdata->guard_time; iores =dev_request_mem_resource (dev,0 );if (IS_ERR (iores))return PTR_ERR (iores);
Signature · 7 lines
2.12.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Lucas Stach
AppliedAm Mittwoch, den 19.07.2017, 23:20 +0200 schrieb Sam Ravnborg:
Quoted 10 lines
While working on enabling DT support for at91sam9263ek I have stumbled over a fev issues that are all fixed in the following patches.
Some of the issues may only be relevant when we have more at91 boards supporting DT.
None of the fixes are critical and are thus mainly -next material.Sam
Quoted 7 lines
Sam Ravnborg (6):
arm: at91 bootstrap: declare local function static
macb: fix clock probing with DT
clk: at91: fix clk-main
pinctrl: at91: move initcalls topostcore_initcall
mci:atmel_mci: fix devinfo DEV with OF enabled
atmel_lcdfb: fix so the correctguard_timeis used
Thanks, applied on -next.
Regards,
Lucas
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox