From 9f46dac1e202d79ad3ca6783d22f8bf6fe0107e6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 28 Jan 2014 10:42:49 -0600 Subject: [PATCH] Add option to indicatet that data is retained in SDRAM --- arch/Kconfig | 20 +++++++++++++++++++ arch/arm/Kconfig | 1 + arch/arm/src/lpc17xx/Kconfig | 1 + arch/arm/src/lpc31xx/Kconfig | 1 + arch/arm/src/sam34/Kconfig | 1 + configs/sama5d3x-ek/demo/Make.defs | 7 +++++-- configs/sama5d3x-ek/hello/Make.defs | 8 ++++++-- configs/sama5d3x-ek/norboot/Make.defs | 8 ++++++-- configs/sama5d3x-ek/nsh/Make.defs | 8 ++++++-- configs/sama5d3x-ek/nx/Make.defs | 8 ++++++-- configs/sama5d3x-ek/nxwm/Make.defs | 6 +++++- configs/sama5d3x-ek/ostest/Make.defs | 8 ++++++-- configs/sama5d3x-ek/ov2640/Make.defs | 8 ++++++-- .../scripts/{norflash.ld => nor-isram.ld} | 2 +- drivers/mtd/Kconfig | 5 ----- 15 files changed, 71 insertions(+), 21 deletions(-) rename configs/sama5d3x-ek/scripts/{norflash.ld => nor-isram.ld} (98%) diff --git a/arch/Kconfig b/arch/Kconfig index 36b04dc105..983950d648 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -139,6 +139,11 @@ config ARCH_HAVE_VFORK config ARCH_HAVE_MMU bool + default n + +config ARCH_NAND_HWECC + bool + default n config ARCH_IRQPRIO bool "Prioritized interrupt support" @@ -428,4 +433,19 @@ config FLASH_SIZE refers to the FLASH that you link program code into. endif # BOOT_RUNFROMFLASH && ARCH_HAVE_MMU + +config ARCH_HAVE_SDRAM + bool + default n + +config BOOT_SDRAM_DATA + bool "Data in SDRAM" + default n + depends on ARCH_HAVE_SDRAM + ---help--- + This selection should be set if data lies in SDRAM (vs. SRAM). In + that case, the initialization sequence is a little different: SDRAM + must be configured before before the .data and .bss sections can be + initialized. + endmenu # Boot Memory Configuration diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0e721697f3..53a82f8e53 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -16,6 +16,7 @@ config ARCH_CHIP_A1X select ARCH_HAVE_FPU select ARCH_HAVE_MMU select ARCH_HAVE_LOWVECTORS + select ARCH_HAVE_SDRAM select BOOT_RUNFROMSDRAM ---help--- Allwinner A1X family: A10, A10S (A12), A13 (ARM Cortex-A8) diff --git a/arch/arm/src/lpc17xx/Kconfig b/arch/arm/src/lpc17xx/Kconfig index 31fbc1a8a0..20b4b37e6d 100644 --- a/arch/arm/src/lpc17xx/Kconfig +++ b/arch/arm/src/lpc17xx/Kconfig @@ -374,6 +374,7 @@ config LPC17_EXTDRAM bool "Configure external DRAM" default n depends on ARCH_HAVE_EXTDRAM + select ARCH_HAVE_SDRAM ---help--- Configure external DRAM memory and, if applicable, map then external DRAM into the memory map. diff --git a/arch/arm/src/lpc31xx/Kconfig b/arch/arm/src/lpc31xx/Kconfig index cde565a2ae..1355196991 100644 --- a/arch/arm/src/lpc31xx/Kconfig +++ b/arch/arm/src/lpc31xx/Kconfig @@ -104,6 +104,7 @@ config LPC31_EXTDRAM bool "Configure external DRAM" default n depends on ARCH_HAVE_EXTDRAM + select ARCH_HAVE_SDRAM ---help--- Configure external DRAM memory and, if applicable, map then external DRAM into the memory map. diff --git a/arch/arm/src/sam34/Kconfig b/arch/arm/src/sam34/Kconfig index 77cc639c2b..c3b49472ae 100644 --- a/arch/arm/src/sam34/Kconfig +++ b/arch/arm/src/sam34/Kconfig @@ -720,6 +720,7 @@ config SAM34_EXTDRAM bool "Configure external DRAM" default n depends on ARCH_HAVE_EXTDRAM + select ARCH_HAVE_SDRAM ---help--- Configure external DRAM memory and, if applicable, map then external DRAM into the memory map. diff --git a/configs/sama5d3x-ek/demo/Make.defs b/configs/sama5d3x-ek/demo/Make.defs index c753793379..1a5bc29ad8 100644 --- a/configs/sama5d3x-ek/demo/Make.defs +++ b/configs/sama5d3x-ek/demo/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/demo/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,10 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/hello/Make.defs b/configs/sama5d3x-ek/hello/Make.defs index 7d53ca0403..3577ab4fc2 100644 --- a/configs/sama5d3x-ek/hello/Make.defs +++ b/configs/sama5d3x-ek/hello/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/hello/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/norboot/Make.defs b/configs/sama5d3x-ek/norboot/Make.defs index 01bb08f7ab..eface1020a 100644 --- a/configs/sama5d3x-ek/norboot/Make.defs +++ b/configs/sama5d3x-ek/norboot/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/norboot/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/nsh/Make.defs b/configs/sama5d3x-ek/nsh/Make.defs index dcc2a4731f..1b22a40cb1 100644 --- a/configs/sama5d3x-ek/nsh/Make.defs +++ b/configs/sama5d3x-ek/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/nsh/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/nx/Make.defs b/configs/sama5d3x-ek/nx/Make.defs index 06e54dd9db..70f878c0d3 100644 --- a/configs/sama5d3x-ek/nx/Make.defs +++ b/configs/sama5d3x-ek/nx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/nx/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/nxwm/Make.defs b/configs/sama5d3x-ek/nxwm/Make.defs index 357d2b6050..96c6d4ff16 100644 --- a/configs/sama5d3x-ek/nxwm/Make.defs +++ b/configs/sama5d3x-ek/nxwm/Make.defs @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/ostest/Make.defs b/configs/sama5d3x-ek/ostest/Make.defs index 56e4fcdad3..749b24a772 100644 --- a/configs/sama5d3x-ek/ostest/Make.defs +++ b/configs/sama5d3x-ek/ostest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/ostest/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/ov2640/Make.defs b/configs/sama5d3x-ek/ov2640/Make.defs index 629aacad9a..f3aff660b8 100644 --- a/configs/sama5d3x-ek/ov2640/Make.defs +++ b/configs/sama5d3x-ek/ov2640/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sama5d3x-ek/ov2640/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,7 +44,11 @@ ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y) LDSCRIPT = ddram.ld endif ifeq ($(CONFIG_SAMA5_BOOT_CS0FLASH),y) - LDSCRIPT = norflash.ld +ifeq ($(CONFIG_BOOT_SDRAM_DATA),y) + LDSCRIPT = nor-ddram.ld +else + LDSCRIPT = nor-isram.ld +endif endif ifeq ($(CONFIG_SAMA5_BOOT_CS1FLASH),y) # LDSCRIPT = cs1flash.ld diff --git a/configs/sama5d3x-ek/scripts/norflash.ld b/configs/sama5d3x-ek/scripts/nor-isram.ld similarity index 98% rename from configs/sama5d3x-ek/scripts/norflash.ld rename to configs/sama5d3x-ek/scripts/nor-isram.ld index 9fb738ccb4..ef6c05e7f4 100644 --- a/configs/sama5d3x-ek/scripts/norflash.ld +++ b/configs/sama5d3x-ek/scripts/nor-isram.ld @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/sama5d3x-ek/scripts/norflash.ld + * configs/sama5d3x-ek/scripts/nor-isram.ld * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index c4bb65461e..a036d03559 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -85,11 +85,6 @@ config MTD_CONFIG_ERASEDVALUE comment "MTD Device Drivers" - -config ARCH_NAND_HWECC - bool - default n - menuconfig MTD_NAND bool "MTD NAND support" default n