Re: [PATCH v2 2/6] ARM: at91: xload-mmc: add sama5d3_atmci_start_image() helper

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

 



On Fri, Apr 23, 2021 at 04:28:25PM +0200, Oleksij Rempel wrote:
> This helper should be called from the xloader
> 
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-at91/Kconfig              |  2 +
>  arch/arm/mach-at91/include/mach/xload.h |  2 +
>  arch/arm/mach-at91/xload-mmc.c          | 51 +++++++++++++++++++++++++
>  3 files changed, 55 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index 52eefc7361..0fc8d25111 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -45,6 +45,7 @@ config HAVE_AT91_DDRAMC
>  
>  config AT91_MCI_PBL
>  	bool
> +	depends on MCI_ATMEL_PBL
>  	depends on MCI_ATMEL_SDHCI_PBL
>  	default y
>  
> @@ -599,6 +600,7 @@ config MACH_MICROCHIP_KSZ9477_EVB
>  	bool "Microchip EVB-KSZ9477 Evaluation Kit"
>  	select SOC_SAMA5D3
>  	select OFDEVICE
> +	select MCI_ATMEL_PBL
>  	select COMMON_CLK_OF_PROVIDER
>  	help
>  	  Select this if you are using Microchip's EVB-KSZ9477 Evaluation Kit.
> diff --git a/arch/arm/mach-at91/include/mach/xload.h b/arch/arm/mach-at91/include/mach/xload.h
> index 9201e7d0b7..bbc70af210 100644
> --- a/arch/arm/mach-at91/include/mach/xload.h
> +++ b/arch/arm/mach-at91/include/mach/xload.h
> @@ -5,6 +5,8 @@
>  #include <pbl.h>
>  
>  void __noreturn sama5d2_sdhci_start_image(u32 r4);
> +void __noreturn sama5d3_atmci_start_image(u32 r4, unsigned int clock,
> +					  unsigned int slot);
>  
>  int at91_sdhci_bio_init(struct pbl_bio *bio, void __iomem *base);
>  int at91_mci_bio_init(struct pbl_bio *bio, void __iomem *base,
> diff --git a/arch/arm/mach-at91/xload-mmc.c b/arch/arm/mach-at91/xload-mmc.c
> index e9edeccb7f..e865f237ef 100644
> --- a/arch/arm/mach-at91/xload-mmc.c
> +++ b/arch/arm/mach-at91/xload-mmc.c
> @@ -3,6 +3,7 @@
>  #include <mach/sama5_bootsource.h>
>  #include <mach/hardware.h>
>  #include <mach/sama5d2_ll.h>
> +#include <mach/sama5d3_ll.h>
>  #include <mach/gpio.h>
>  #include <linux/sizes.h>
>  #include <asm/cache.h>
> @@ -44,6 +45,23 @@ static const struct sdhci_instance {
>  	},
>  };
>  
> +static const struct atmci_instance {
> +	void __iomem *base;
> +	unsigned id;
> +	u8 periph;
> +	s8 pins[15];
> +} atmci_instances[] = {

Renamed this to sama5d3_atmci_instances while applying as for example
sama5d4 has different base addresses for the same hardware.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux