Re: [PATCH v3 08/15] ARM: at91: import low level DDRAMC initialization code from at91bootstrap

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

 



On Mon, Apr 01, 2019 at 12:18:16PM +0200, Ahmad Fatoum wrote:
> This commit imports DDRAMC initialization routines for use in PBL from
> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/ddramc.c
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-at91/Makefile              |   1 +
>  arch/arm/mach-at91/ddramc.c              | 507 +++++++++++++++++++++++
>  arch/arm/mach-at91/include/mach/ddramc.h |  36 ++
>  3 files changed, 544 insertions(+)
>  create mode 100644 arch/arm/mach-at91/ddramc.c
>  create mode 100644 arch/arm/mach-at91/include/mach/ddramc.h
> 
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 25a7916c34e4..f4eb412a2397 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -1,6 +1,7 @@
>  obj-y += setup.o
>  pbl-y += at91_pmc_ll.o
>  pbl-$(CONFIG_CLOCKSOURCE_ATMEL_PIT) += early_udelay.o
> +pbl-y += ddramc.o
>  
>  ifeq ($(CONFIG_COMMON_CLK_OF_PROVIDER),)
>  obj-y += clock.o
> diff --git a/arch/arm/mach-at91/ddramc.c b/arch/arm/mach-at91/ddramc.c
> new file mode 100644
> index 000000000000..a67c8266af4b
> --- /dev/null
> +++ b/arch/arm/mach-at91/ddramc.c
> @@ -0,0 +1,507 @@
> +// SPDX-License-Identifier: BSD-1-Clause
> +/*
> + * Copyright (c) 2007, Stelian Pop <stelian.pop@xxxxxxxxxxxxxxxxxx>
> + * Copyright (c) 2007 Lead Tech Design <www.leadtechdesign.com>
> + */
> +
> +#include <linux/kconfig.h>
> +#include <asm/system.h>
> +#include <mach/at91_ddrsdrc.h>
> +#include <mach/ddramc.h>
> +#include <mach/early_udelay.h>
> +
> +void at91_ddram_initialize(unsigned long base_address,
> +			   unsigned long ram_address,
> +			   struct at91_ddramc_register *ddramc_config)

The base_address argument should be of type void __iomem *.
Same for the other functions.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 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