[PATCH linux 1/4] aspeed: Use old MDC/MDIO interface for ftgmac100 driver compat

Joel Stanley joel at jms.id.au
Fri Jun 10 18:39:58 AEST 2016


On Thu, Jun 9, 2016 at 11:44 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> This is a work-around, and we should aim to move to the new interface.
>
> Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> ---
>  arch/arm/mach-aspeed/aspeed.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> index 90c541f32ee8..12f3a044a03c 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -82,6 +82,7 @@ static void __init aspeed_dt_init(void)
>
>  #define AST_BASE_LPC           0x1E789000 /* LPC Controller */
>  #define AST_BASE_SPI           0x1E630000 /* SPI Memory Controller */
> +#define AST_BASE_MAC1          0X1E660000 /* MAC 1 */
>  #define AST_BASE_SCU           0x1E6E2000 /* System Control Unit (SCU) */
>  #define AST_BASE_GPIO          0x1E780000 /* GPIO Controller */
>
> @@ -186,8 +187,15 @@ static void __init do_garrison_setup(void)
>
>  static void __init do_ast2500evb_setup(void)
>  {
> +       unsigned long reg;
> +
>         /* Reset AHB bridges */
>         writel(0x02, AST_IO(AST_BASE_SCU | 0x04));
> +
> +       /* Set old MDIO interface */
> +       reg = readl(AST_IO(AST_BASE_MAC1 | 0x40));
> +       reg &= ~0x80000000;
> +       writel(reg, AST_IO(AST_BASE_MAC1 | 0x40));

I think this is common to all ast2500 platforms. We should put it in a
function that matches on aspeed,ast2500.


>  }
>
>  #define SCU_PASSWORD   0x1688A8A8
> --
> 2.7.4
>


More information about the openbmc mailing list