mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
Move arch/ppc to arch/powerpc
As discussed on the list, move "arch/ppc" to "arch/powerpc" to better match the Linux directory structure. Please note that this patch also changes the "ppc" target in MAKEALL to "powerpc" to match this new infrastructure. But "ppc" is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
254ab7bd46
commit
a47a12becf
579 changed files with 879 additions and 877 deletions
77
arch/powerpc/include/asm/status_led.h
Normal file
77
arch/powerpc/include/asm/status_led.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* asm/status_led.h
|
||||
*
|
||||
* MPC8xx/MPC8260/MPC5xx based status led support functions
|
||||
*/
|
||||
|
||||
#ifndef __ASM_STATUS_LED_H__
|
||||
#define __ASM_STATUS_LED_H__
|
||||
|
||||
/* if not overriden */
|
||||
#ifndef CONFIG_BOARD_SPECIFIC_LED
|
||||
# if defined(CONFIG_8xx)
|
||||
# include <mpc8xx.h>
|
||||
# elif defined(CONFIG_8260)
|
||||
# include <mpc8260.h>
|
||||
# elif defined(CONFIG_5xx)
|
||||
# include <mpc5xx.h>
|
||||
# else
|
||||
# error CPU specific Status LED header file missing.
|
||||
#endif
|
||||
|
||||
/* led_id_t is unsigned long mask */
|
||||
typedef unsigned long led_id_t;
|
||||
|
||||
static inline void __led_init (led_id_t mask, int state)
|
||||
{
|
||||
volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
|
||||
|
||||
#ifdef STATUS_LED_PAR
|
||||
immr->STATUS_LED_PAR &= ~mask;
|
||||
#endif
|
||||
#ifdef STATUS_LED_ODR
|
||||
immr->STATUS_LED_ODR &= ~mask;
|
||||
#endif
|
||||
|
||||
#if (STATUS_LED_ACTIVE == 0)
|
||||
if (state == STATUS_LED_ON)
|
||||
immr->STATUS_LED_DAT &= ~mask;
|
||||
else
|
||||
immr->STATUS_LED_DAT |= mask;
|
||||
#else
|
||||
if (state == STATUS_LED_ON)
|
||||
immr->STATUS_LED_DAT |= mask;
|
||||
else
|
||||
immr->STATUS_LED_DAT &= ~mask;
|
||||
#endif
|
||||
#ifdef STATUS_LED_DIR
|
||||
immr->STATUS_LED_DIR |= mask;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void __led_toggle (led_id_t mask)
|
||||
{
|
||||
((immap_t *) CONFIG_SYS_IMMR)->STATUS_LED_DAT ^= mask;
|
||||
}
|
||||
|
||||
static inline void __led_set (led_id_t mask, int state)
|
||||
{
|
||||
volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
|
||||
|
||||
#if (STATUS_LED_ACTIVE == 0)
|
||||
if (state == STATUS_LED_ON)
|
||||
immr->STATUS_LED_DAT &= ~mask;
|
||||
else
|
||||
immr->STATUS_LED_DAT |= mask;
|
||||
#else
|
||||
if (state == STATUS_LED_ON)
|
||||
immr->STATUS_LED_DAT |= mask;
|
||||
else
|
||||
immr->STATUS_LED_DAT &= ~mask;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_STATUS_LED_H__ */
|
Loading…
Add table
Add a link
Reference in a new issue