diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-06-02 10:33:57 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-06-02 10:33:57 -0600 |
commit | 872bef7d41462d36b81ddc8de82a2cde18eaf096 (patch) | |
tree | dcc012bbbf92ca5ffa9cf99208d17e6b7eb5fa59 /nuttx/configs/sam3u-ek/src | |
parent | b81b86e1f8c8a4aa0e3d85df8148152268f74260 (diff) | |
download | px4-nuttx-872bef7d41462d36b81ddc8de82a2cde18eaf096.tar.gz px4-nuttx-872bef7d41462d36b81ddc8de82a2cde18eaf096.tar.bz2 px4-nuttx-872bef7d41462d36b81ddc8de82a2cde18eaf096.zip |
Move SAM3U header files to arch/arm/src/sam3u/chip. Some renaming of SAM3U to SAM to ssupport SAM4. Convert all configs/sam3u-ek configurations to use the kconfig-frontends tool
Diffstat (limited to 'nuttx/configs/sam3u-ek/src')
-rw-r--r-- | nuttx/configs/sam3u-ek/src/Makefile | 8 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/sam3uek_internal.h | 18 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_boot.c | 8 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_lcd.c | 38 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_mmcsd.c | 6 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_nsh.c | 8 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_spi.c | 8 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_touchscreen.c | 16 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_usbmsc.c | 18 |
9 files changed, 64 insertions, 64 deletions
diff --git a/nuttx/configs/sam3u-ek/src/Makefile b/nuttx/configs/sam3u-ek/src/Makefile index 258748a1d..8dbf0eae5 100644 --- a/nuttx/configs/sam3u-ek/src/Makefile +++ b/nuttx/configs/sam3u-ek/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/sam3u-ek/src/Makefile # -# Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2009-2010, 2012-2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -37,12 +37,12 @@ CFLAGS += -I$(TOPDIR)/sched -ASRCS = +ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = up_boot.c up_leds.c up_buttons.c up_spi.c up_usbdev.c -ifeq ($(CONFIG_SAM3U_HSMCI),y) +ifeq ($(CONFIG_SAM34_HSMCI),y) CSRCS += up_lcd.c endif @@ -50,7 +50,7 @@ ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_SAM3U_HSMCI),y) +ifeq ($(CONFIG_SAM34_HSMCI),y) CSRCS += up_mmcsd.c endif diff --git a/nuttx/configs/sam3u-ek/src/sam3uek_internal.h b/nuttx/configs/sam3u-ek/src/sam3uek_internal.h index 5b5138960..d81fbd7cc 100644 --- a/nuttx/configs/sam3u-ek/src/sam3uek_internal.h +++ b/nuttx/configs/sam3u-ek/src/sam3uek_internal.h @@ -2,7 +2,7 @@ * configs/sam3uek_eval/src/sam3uek_internal.h * arch/arm/src/board/sam3uek_internal.n * - * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ /* External Memory Usage ************************************************************/ /* LCD on CS2 */ -#define LCD_BASE SAM3U_EXTCS2_BASE +#define LCD_BASE SAM_EXTCS2_BASE /* Touchscreen controller (TSC) */ @@ -142,7 +142,7 @@ #define GPIO_TCS_IRQ (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_PORT_PIOA|GPIO_PIN24) #define GPIO_TCS_BUSY (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_PORT_PIOA|GPIO_PIN2) -#define SAM3U_TCS_IRQ SAM3U_IRQ_PA24 +#define SAM_TCS_IRQ SAM_IRQ_PA24 /* LEDs */ @@ -155,8 +155,8 @@ #define GPIO_BUTTON1 (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_CFG_DEGLITCH|GPIO_PORT_PIOA|GPIO_PIN18) #define GPIO_BUTTON2 (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_CFG_DEGLITCH|GPIO_PORT_PIOA|GPIO_PIN19) -#define IRQ_BUTTON1 SAM3U_IRQ_PA18 -#define IRQ_BUTTON2 SAM3U_IRQ_PA19 +#define IRQ_BUTTON1 SAM_IRQ_PA18 +#define IRQ_BUTTON2 SAM_IRQ_PA19 /* SD Card Detect */ @@ -214,11 +214,11 @@ extern void weak_function sam3u_usbinitialize(void); * Name: sam3u_hsmciinit * * Description: - * Initialize HSMCI support + * Initialize HSMCI support * ****************************************************************************/ -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI extern int weak_function sam3u_hsmciinit(void); #else # define sam3u_hsmciinit() @@ -232,7 +232,7 @@ extern int weak_function sam3u_hsmciinit(void); * ****************************************************************************/ -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI extern bool sam3u_cardinserted(unsigned char slot); #else # define sam3u_cardinserted(slot) (false) @@ -246,7 +246,7 @@ extern bool sam3u_cardinserted(unsigned char slot); * ****************************************************************************/ -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI extern bool sam3u_writeprotected(unsigned char slot); #else # define sam3u_writeprotected(slot) (false) diff --git a/nuttx/configs/sam3u-ek/src/up_boot.c b/nuttx/configs/sam3u-ek/src/up_boot.c index 87e91f039..11bb80f07 100644 --- a/nuttx/configs/sam3u-ek/src/up_boot.c +++ b/nuttx/configs/sam3u-ek/src/up_boot.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_boot.c * arch/arm/src/board/up_boot.c * - * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -75,7 +75,7 @@ void sam3u_boardinitialize(void) * sam3u_spiinitialize() has been brought into the link. */ -#ifdef CONFIG_SAM3U_SPI +#ifdef CONFIG_SAM34_SPI if (sam3u_spiinitialize) { sam3u_spiinitialize(); @@ -87,7 +87,7 @@ void sam3u_boardinitialize(void) * into the build. */ -#if defined(CONFIG_USBDEV) && defined(CONFIG_SAM3U_USB) +#if defined(CONFIG_USBDEV) && defined(CONFIG_SAM34_USB) if (sam3u_usbinitialize) { sam3u_usbinitialize(); @@ -104,7 +104,7 @@ void sam3u_boardinitialize(void) * function sam3u_hsmciinit() has been brought into the build. */ -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI if (sam3u_hsmciinit) { sam3u_hsmciinit(); diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c index de897ab9f..fded845a4 100644 --- a/nuttx/configs/sam3u-ek/src/up_lcd.c +++ b/nuttx/configs/sam3u-ek/src/up_lcd.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_lcd.c * arch/arm/src/board/up_lcd.c * - * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -125,8 +125,8 @@ #include <arch/irq.h> #include "up_arch.h" -#include "sam3u_pmc.h" -#include "sam3u_smc.h" +#include "chip/sam_pmc.h" +#include "chip/sam_smc.h" #include "sam3u_internal.h" #include "sam3uek_internal.h" @@ -385,7 +385,7 @@ static const struct fb_videoinfo_s g_videoinfo = /* This is the standard, NuttX Plane information object */ -static const struct lcd_planeinfo_s g_planeinfo = +static const struct lcd_planeinfo_s g_planeinfo = { .putrun = sam3u_putrun, /* Put a run into LCD memory */ .getrun = sam3u_getrun, /* Get a run from LCD memory */ @@ -395,12 +395,12 @@ static const struct lcd_planeinfo_s g_planeinfo = /* This is the standard, NuttX LCD driver object */ -static struct sam3u_dev_s g_lcddev_s = +static struct sam3u_dev_s g_lcddev_s = { .dev = { /* LCD Configuration */ - + .getvideoinfo = sam3u_getvideoinfo, .getplaneinfo = sam3u_getplaneinfo, @@ -901,33 +901,33 @@ int up_lcdinitialize(void) /* Enable SMC peripheral clock */ - putreg32((1 << SAM3U_PID_SMC), SAM3U_PMC_PCER); - regdbg("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM3U_PMC_PCSR), (1 << SAM3U_PID_SMC)); + putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER); + regdbg("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC)); /* Configure SMC CS2 */ regval = (4 << SMCCS_SETUP_NWESETUP_SHIFT) | (2 << SMCCS_SETUP_NCSWRSETUP_SHIFT) | (4 << SMCCS_SETUP_NRDSETUP_SHIFT) | (2 << SMCCS_SETUP_NCSRDSETUP_SHIFT); - putreg32(regval, SAM3U_SMCCS_SETUP(2)); + putreg32(regval, SAM_SMCCS_SETUP(2)); regval = (5 << SMCCS_PULSE_NWEPULSE_SHIFT) | (18 << SMCCS_PULSE_NCSWRPULSE_SHIFT) | (5 << SMCCS_PULSE_RDPULSE_SHIFT) | (18 << SMCCS_PULSE_NCSRDPULSE_SHIFT); - putreg32(regval, SAM3U_SMCCS_PULSE(2)); + putreg32(regval, SAM_SMCCS_PULSE(2)); regval = (22 << SMCCS_CYCLE_NWECYCLE_SHIFT) | (22 << SMCCS_CYCLE_NRDCYCLE_SHIFT); - putreg32(regval, SAM3U_SMCCS_CYCLE(2)); + putreg32(regval, SAM_SMCCS_CYCLE(2)); - regval = getreg32(SAM3U_SMCCS_MODE(2)); + regval = getreg32(SAM_SMCCS_MODE(2)); regval &= ~(SMCCS_MODE_DBW_MASK | SMCCS_MODE_PMEN); regval |= (SMCCS_MODE_READMODE) | (SMCCS_MODE_WRITEMODE) | (SMCCS_MODE_DBW_16BITS); - putreg32(regval, SAM3U_SMCCS_MODE(2)); + putreg32(regval, SAM_SMCCS_MODE(2)); regdbg("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n", - SAM3U_SMCCS_SETUP(2), getreg32(SAM3U_SMCCS_SETUP(2)), - SAM3U_SMCCS_PULSE(2), getreg32(SAM3U_SMCCS_PULSE(2))); + SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)), + SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2))); regdbg(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n", - SAM3U_SMCCS_CYCLE(2), getreg32(SAM3U_SMCCS_CYCLE(2)), - SAM3U_SMCCS_MODE(2), getreg32(SAM3U_SMCCS_MODE(2))); + SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)), + SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2))); /* Check HX8347 Chip ID */ @@ -989,7 +989,7 @@ int up_lcdinitialize(void) sam3u_putreg(HX8347_R09H, 0x3f); /* Row address end1 */ /* Display Setting */ - + sam3u_putreg(HX8347_R01H, 0x06); /* IDMON=0 INVON=1 NORON=1 PTLON=0 */ sam3u_putreg(HX8347_R16H, 0xc8); /* MY=1 MX=1 MV=0 BGR=1 */ sam3u_putreg(HX8347_R23H, 0x95); /* N_DC=1001 0101 */ @@ -1063,7 +1063,7 @@ void up_lcduninitialize(void) /* Disable SMC peripheral clock */ - putreg32((1 << SAM3U_PID_SMC), SAM3U_PMC_PCDR); + putreg32((1 << SAM_PID_SMC), SAM_PMC_PCDR); } diff --git a/nuttx/configs/sam3u-ek/src/up_mmcsd.c b/nuttx/configs/sam3u-ek/src/up_mmcsd.c index bfa4ce4a7..0ea8b9207 100644 --- a/nuttx/configs/sam3u-ek/src/up_mmcsd.c +++ b/nuttx/configs/sam3u-ek/src/up_mmcsd.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_mmcsd.c * arch/arm/src/board/up_mmcsd.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ #include "sam3u_internal.h" #include "sam3uek_internal.h" -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI /************************************************************************************ * Definitions @@ -136,4 +136,4 @@ bool sam3u_writeprotected(unsigned char slot) return false; } -#endif /* CONFIG_SAM3U_HSMCI */ +#endif /* CONFIG_SAM34_HSMCI */ diff --git a/nuttx/configs/sam3u-ek/src/up_nsh.c b/nuttx/configs/sam3u-ek/src/up_nsh.c index 628405521..436704929 100644 --- a/nuttx/configs/sam3u-ek/src/up_nsh.c +++ b/nuttx/configs/sam3u-ek/src/up_nsh.c @@ -2,7 +2,7 @@ * config/sam3u-ek/src/up_nsh.c * arch/arm/src/board/up_nsh.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ #include "sam3u_internal.h" #include "sam3uek_internal.h" -#ifdef CONFIG_SAM3U_HSMCI +#ifdef CONFIG_SAM34_HSMCI /**************************************************************************** * Pre-Processor Definitions @@ -83,7 +83,7 @@ * is not enabled. */ -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM3U_HSMCI) +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM34_HSMCI) # undef NSH_HAVE_MMCSD #endif @@ -149,7 +149,7 @@ int nsh_archinitialize(void) return ret; } message("nsh_archinitialize: Successfully bound SDIO to the MMC/SD driver\n"); - + /* Then inform the HSMCI driver if there is or is not a card in the slot. */ sdio_mediachange(sdio, sam3u_cardinserted(0)); diff --git a/nuttx/configs/sam3u-ek/src/up_spi.c b/nuttx/configs/sam3u-ek/src/up_spi.c index 8dafc293e..a4b1881bc 100644 --- a/nuttx/configs/sam3u-ek/src/up_spi.c +++ b/nuttx/configs/sam3u-ek/src/up_spi.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_spi.c * arch/arm/src/board/up_spi.c * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ #include "sam3u_internal.h" #include "sam3uek_internal.h" -#ifdef CONFIG_SAM3U_SPI +#ifdef CONFIG_SAM34_SPI /************************************************************************************ * Definitions @@ -137,7 +137,7 @@ void weak_function sam3u_spiinitialize(void) * 3. Add a call to up_spiinitialize() in your low level application * initialization logic * 4. The handle returned by up_spiinitialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling + * SPI driver to higher level logic (e.g., calling * mmcsd_spislotinitialize(), for example, will bind the SPI driver to * the SPI MMC/SD driver). * @@ -240,4 +240,4 @@ uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) return 0; } -#endif /* CONFIG_SAM3U_SPI */ +#endif /* CONFIG_SAM34_SPI */ diff --git a/nuttx/configs/sam3u-ek/src/up_touchscreen.c b/nuttx/configs/sam3u-ek/src/up_touchscreen.c index 35ab43859..3157f7160 100644 --- a/nuttx/configs/sam3u-ek/src/up_touchscreen.c +++ b/nuttx/configs/sam3u-ek/src/up_touchscreen.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_touchscreen.c * arch/arm/src/board/up_touchscreen.c * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -63,8 +63,8 @@ # error "Touchscreen support requires CONFIG_INPUT" #endif -#ifndef CONFIG_SAM3U_SPI -# error "Touchscreen support requires CONFIG_SAM3U_SPI" +#ifndef CONFIG_SAM34_SPI +# error "Touchscreen support requires CONFIG_SAM34_SPI" #endif #ifndef CONFIG_GPIOA_IRQ @@ -154,22 +154,22 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) { /* Attach the ADS7843E interrupt */ - ivdbg("Attaching %p to IRQ %d\n", isr, SAM3U_TCS_IRQ); - return irq_attach(SAM3U_TCS_IRQ, isr); + ivdbg("Attaching %p to IRQ %d\n", isr, SAM_TCS_IRQ); + return irq_attach(SAM_TCS_IRQ, isr); } static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) { /* Attach and enable, or detach and disable */ - ivdbg("IRQ:%d enable:%d\n", SAM3U_TCS_IRQ, enable); + ivdbg("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable); if (enable) { - sam3u_gpioirqenable(SAM3U_TCS_IRQ); + sam3u_gpioirqenable(SAM_TCS_IRQ); } else { - sam3u_gpioirqdisable(SAM3U_TCS_IRQ); + sam3u_gpioirqdisable(SAM_TCS_IRQ); } } diff --git a/nuttx/configs/sam3u-ek/src/up_usbmsc.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c index dfe2e2c49..2bba22901 100644 --- a/nuttx/configs/sam3u-ek/src/up_usbmsc.c +++ b/nuttx/configs/sam3u-ek/src/up_usbmsc.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sam3u-ek/src/up_usbmsc.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Configure and register the SAM3U MMC/SD SDIO block driver. @@ -50,7 +50,7 @@ #include "sam3u_internal.h" -#ifdef CONFIG_SAM3U_SDIO +#ifdef CONFIG_SAM34_SDIO /**************************************************************************** * Pre-Processor Definitions @@ -65,8 +65,8 @@ /* SLOT number(s) could depend on the board configuration */ #ifdef CONFIG_ARCH_BOARD_SAM3U10E_EVAL -# undef SAM3U_MMCSDSLOTNO -# define SAM3U_MMCSDSLOTNO 0 +# undef SAM_MMCSDSLOTNO +# define SAM_MMCSDSLOTNO 0 #else /* Add configuration for new SAM3U boards here */ # error "Unrecognized SAM3U board" @@ -113,13 +113,13 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: " "Initializing SDIO slot %d\n", - SAM3U_MMCSDSLOTNO); + SAM_MMCSDSLOTNO); - sdio = sdio_initialize(SAM3U_MMCSDSLOTNO); + sdio = sdio_initialize(SAM_MMCSDSLOTNO); if (!sdio) { message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n", - SAM3U_MMCSDSLOTNO); + SAM_MMCSDSLOTNO); return -ENODEV; } @@ -139,7 +139,7 @@ int usbmsc_archinitialize(void) } message("usbmsc_archinitialize: " "Successfully bound SDIO to the MMC/SD driver\n"); - + /* Then let's guess and say that there is a card in the slot. I need to check to * see if the SAM3U10E-EVAL board supports a GPIO to detect if there is a card in * the slot. @@ -149,4 +149,4 @@ int usbmsc_archinitialize(void) return OK; } -#endif /* CONFIG_SAM3U_SDIO */ +#endif /* CONFIG_SAM34_SDIO */ |