162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Prototypes, etc. for the Freescale MPC52xx embedded cpu chips 362306a36Sopenharmony_ci * May need to be cleaned as the port goes on ... 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2004-2005 Sylvain Munaut <tnt@246tNt.com> 662306a36Sopenharmony_ci * Copyright (C) 2003 MontaVista, Software, Inc. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * This file is licensed under the terms of the GNU General Public License 962306a36Sopenharmony_ci * version 2. This program is licensed "as is" without any warranty of any 1062306a36Sopenharmony_ci * kind, whether express or implied. 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#ifndef __ASM_POWERPC_MPC52xx_H__ 1462306a36Sopenharmony_ci#define __ASM_POWERPC_MPC52xx_H__ 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 1762306a36Sopenharmony_ci#include <asm/types.h> 1862306a36Sopenharmony_ci#include <asm/mpc5xxx.h> 1962306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#include <linux/suspend.h> 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci/* Variants of the 5200(B) */ 2462306a36Sopenharmony_ci#define MPC5200_SVR 0x80110010 2562306a36Sopenharmony_ci#define MPC5200_SVR_MASK 0xfffffff0 2662306a36Sopenharmony_ci#define MPC5200B_SVR 0x80110020 2762306a36Sopenharmony_ci#define MPC5200B_SVR_MASK 0xfffffff0 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci/* ======================================================================== */ 3062306a36Sopenharmony_ci/* Structures mapping of some unit register set */ 3162306a36Sopenharmony_ci/* ======================================================================== */ 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci/* Memory Mapping Control */ 3662306a36Sopenharmony_cistruct mpc52xx_mmap_ctl { 3762306a36Sopenharmony_ci u32 mbar; /* MMAP_CTRL + 0x00 */ 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci u32 cs0_start; /* MMAP_CTRL + 0x04 */ 4062306a36Sopenharmony_ci u32 cs0_stop; /* MMAP_CTRL + 0x08 */ 4162306a36Sopenharmony_ci u32 cs1_start; /* MMAP_CTRL + 0x0c */ 4262306a36Sopenharmony_ci u32 cs1_stop; /* MMAP_CTRL + 0x10 */ 4362306a36Sopenharmony_ci u32 cs2_start; /* MMAP_CTRL + 0x14 */ 4462306a36Sopenharmony_ci u32 cs2_stop; /* MMAP_CTRL + 0x18 */ 4562306a36Sopenharmony_ci u32 cs3_start; /* MMAP_CTRL + 0x1c */ 4662306a36Sopenharmony_ci u32 cs3_stop; /* MMAP_CTRL + 0x20 */ 4762306a36Sopenharmony_ci u32 cs4_start; /* MMAP_CTRL + 0x24 */ 4862306a36Sopenharmony_ci u32 cs4_stop; /* MMAP_CTRL + 0x28 */ 4962306a36Sopenharmony_ci u32 cs5_start; /* MMAP_CTRL + 0x2c */ 5062306a36Sopenharmony_ci u32 cs5_stop; /* MMAP_CTRL + 0x30 */ 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci u32 sdram0; /* MMAP_CTRL + 0x34 */ 5362306a36Sopenharmony_ci u32 sdram1; /* MMAP_CTRL + 0X38 */ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci u32 reserved[4]; /* MMAP_CTRL + 0x3c .. 0x48 */ 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci u32 boot_start; /* MMAP_CTRL + 0x4c */ 5862306a36Sopenharmony_ci u32 boot_stop; /* MMAP_CTRL + 0x50 */ 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci u32 ipbi_ws_ctrl; /* MMAP_CTRL + 0x54 */ 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci u32 cs6_start; /* MMAP_CTRL + 0x58 */ 6362306a36Sopenharmony_ci u32 cs6_stop; /* MMAP_CTRL + 0x5c */ 6462306a36Sopenharmony_ci u32 cs7_start; /* MMAP_CTRL + 0x60 */ 6562306a36Sopenharmony_ci u32 cs7_stop; /* MMAP_CTRL + 0x64 */ 6662306a36Sopenharmony_ci}; 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci/* SDRAM control */ 6962306a36Sopenharmony_cistruct mpc52xx_sdram { 7062306a36Sopenharmony_ci u32 mode; /* SDRAM + 0x00 */ 7162306a36Sopenharmony_ci u32 ctrl; /* SDRAM + 0x04 */ 7262306a36Sopenharmony_ci u32 config1; /* SDRAM + 0x08 */ 7362306a36Sopenharmony_ci u32 config2; /* SDRAM + 0x0c */ 7462306a36Sopenharmony_ci}; 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci/* SDMA */ 7762306a36Sopenharmony_cistruct mpc52xx_sdma { 7862306a36Sopenharmony_ci u32 taskBar; /* SDMA + 0x00 */ 7962306a36Sopenharmony_ci u32 currentPointer; /* SDMA + 0x04 */ 8062306a36Sopenharmony_ci u32 endPointer; /* SDMA + 0x08 */ 8162306a36Sopenharmony_ci u32 variablePointer; /* SDMA + 0x0c */ 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci u8 IntVect1; /* SDMA + 0x10 */ 8462306a36Sopenharmony_ci u8 IntVect2; /* SDMA + 0x11 */ 8562306a36Sopenharmony_ci u16 PtdCntrl; /* SDMA + 0x12 */ 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci u32 IntPend; /* SDMA + 0x14 */ 8862306a36Sopenharmony_ci u32 IntMask; /* SDMA + 0x18 */ 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci u16 tcr[16]; /* SDMA + 0x1c .. 0x3a */ 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci u8 ipr[32]; /* SDMA + 0x3c .. 0x5b */ 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci u32 cReqSelect; /* SDMA + 0x5c */ 9562306a36Sopenharmony_ci u32 task_size0; /* SDMA + 0x60 */ 9662306a36Sopenharmony_ci u32 task_size1; /* SDMA + 0x64 */ 9762306a36Sopenharmony_ci u32 MDEDebug; /* SDMA + 0x68 */ 9862306a36Sopenharmony_ci u32 ADSDebug; /* SDMA + 0x6c */ 9962306a36Sopenharmony_ci u32 Value1; /* SDMA + 0x70 */ 10062306a36Sopenharmony_ci u32 Value2; /* SDMA + 0x74 */ 10162306a36Sopenharmony_ci u32 Control; /* SDMA + 0x78 */ 10262306a36Sopenharmony_ci u32 Status; /* SDMA + 0x7c */ 10362306a36Sopenharmony_ci u32 PTDDebug; /* SDMA + 0x80 */ 10462306a36Sopenharmony_ci}; 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci/* GPT */ 10762306a36Sopenharmony_cistruct mpc52xx_gpt { 10862306a36Sopenharmony_ci u32 mode; /* GPTx + 0x00 */ 10962306a36Sopenharmony_ci u32 count; /* GPTx + 0x04 */ 11062306a36Sopenharmony_ci u32 pwm; /* GPTx + 0x08 */ 11162306a36Sopenharmony_ci u32 status; /* GPTx + 0X0c */ 11262306a36Sopenharmony_ci}; 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci/* GPIO */ 11562306a36Sopenharmony_cistruct mpc52xx_gpio { 11662306a36Sopenharmony_ci u32 port_config; /* GPIO + 0x00 */ 11762306a36Sopenharmony_ci u32 simple_gpioe; /* GPIO + 0x04 */ 11862306a36Sopenharmony_ci u32 simple_ode; /* GPIO + 0x08 */ 11962306a36Sopenharmony_ci u32 simple_ddr; /* GPIO + 0x0c */ 12062306a36Sopenharmony_ci u32 simple_dvo; /* GPIO + 0x10 */ 12162306a36Sopenharmony_ci u32 simple_ival; /* GPIO + 0x14 */ 12262306a36Sopenharmony_ci u8 outo_gpioe; /* GPIO + 0x18 */ 12362306a36Sopenharmony_ci u8 reserved1[3]; /* GPIO + 0x19 */ 12462306a36Sopenharmony_ci u8 outo_dvo; /* GPIO + 0x1c */ 12562306a36Sopenharmony_ci u8 reserved2[3]; /* GPIO + 0x1d */ 12662306a36Sopenharmony_ci u8 sint_gpioe; /* GPIO + 0x20 */ 12762306a36Sopenharmony_ci u8 reserved3[3]; /* GPIO + 0x21 */ 12862306a36Sopenharmony_ci u8 sint_ode; /* GPIO + 0x24 */ 12962306a36Sopenharmony_ci u8 reserved4[3]; /* GPIO + 0x25 */ 13062306a36Sopenharmony_ci u8 sint_ddr; /* GPIO + 0x28 */ 13162306a36Sopenharmony_ci u8 reserved5[3]; /* GPIO + 0x29 */ 13262306a36Sopenharmony_ci u8 sint_dvo; /* GPIO + 0x2c */ 13362306a36Sopenharmony_ci u8 reserved6[3]; /* GPIO + 0x2d */ 13462306a36Sopenharmony_ci u8 sint_inten; /* GPIO + 0x30 */ 13562306a36Sopenharmony_ci u8 reserved7[3]; /* GPIO + 0x31 */ 13662306a36Sopenharmony_ci u16 sint_itype; /* GPIO + 0x34 */ 13762306a36Sopenharmony_ci u16 reserved8; /* GPIO + 0x36 */ 13862306a36Sopenharmony_ci u8 gpio_control; /* GPIO + 0x38 */ 13962306a36Sopenharmony_ci u8 reserved9[3]; /* GPIO + 0x39 */ 14062306a36Sopenharmony_ci u8 sint_istat; /* GPIO + 0x3c */ 14162306a36Sopenharmony_ci u8 sint_ival; /* GPIO + 0x3d */ 14262306a36Sopenharmony_ci u8 bus_errs; /* GPIO + 0x3e */ 14362306a36Sopenharmony_ci u8 reserved10; /* GPIO + 0x3f */ 14462306a36Sopenharmony_ci}; 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci#define MPC52xx_GPIO_PSC_CONFIG_UART_WITHOUT_CD 4 14762306a36Sopenharmony_ci#define MPC52xx_GPIO_PSC_CONFIG_UART_WITH_CD 5 14862306a36Sopenharmony_ci#define MPC52xx_GPIO_PCI_DIS (1<<15) 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci/* GPIO with WakeUp*/ 15162306a36Sopenharmony_cistruct mpc52xx_gpio_wkup { 15262306a36Sopenharmony_ci u8 wkup_gpioe; /* GPIO_WKUP + 0x00 */ 15362306a36Sopenharmony_ci u8 reserved1[3]; /* GPIO_WKUP + 0x03 */ 15462306a36Sopenharmony_ci u8 wkup_ode; /* GPIO_WKUP + 0x04 */ 15562306a36Sopenharmony_ci u8 reserved2[3]; /* GPIO_WKUP + 0x05 */ 15662306a36Sopenharmony_ci u8 wkup_ddr; /* GPIO_WKUP + 0x08 */ 15762306a36Sopenharmony_ci u8 reserved3[3]; /* GPIO_WKUP + 0x09 */ 15862306a36Sopenharmony_ci u8 wkup_dvo; /* GPIO_WKUP + 0x0C */ 15962306a36Sopenharmony_ci u8 reserved4[3]; /* GPIO_WKUP + 0x0D */ 16062306a36Sopenharmony_ci u8 wkup_inten; /* GPIO_WKUP + 0x10 */ 16162306a36Sopenharmony_ci u8 reserved5[3]; /* GPIO_WKUP + 0x11 */ 16262306a36Sopenharmony_ci u8 wkup_iinten; /* GPIO_WKUP + 0x14 */ 16362306a36Sopenharmony_ci u8 reserved6[3]; /* GPIO_WKUP + 0x15 */ 16462306a36Sopenharmony_ci u16 wkup_itype; /* GPIO_WKUP + 0x18 */ 16562306a36Sopenharmony_ci u8 reserved7[2]; /* GPIO_WKUP + 0x1A */ 16662306a36Sopenharmony_ci u8 wkup_maste; /* GPIO_WKUP + 0x1C */ 16762306a36Sopenharmony_ci u8 reserved8[3]; /* GPIO_WKUP + 0x1D */ 16862306a36Sopenharmony_ci u8 wkup_ival; /* GPIO_WKUP + 0x20 */ 16962306a36Sopenharmony_ci u8 reserved9[3]; /* GPIO_WKUP + 0x21 */ 17062306a36Sopenharmony_ci u8 wkup_istat; /* GPIO_WKUP + 0x24 */ 17162306a36Sopenharmony_ci u8 reserved10[3]; /* GPIO_WKUP + 0x25 */ 17262306a36Sopenharmony_ci}; 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ci/* XLB Bus control */ 17562306a36Sopenharmony_cistruct mpc52xx_xlb { 17662306a36Sopenharmony_ci u8 reserved[0x40]; 17762306a36Sopenharmony_ci u32 config; /* XLB + 0x40 */ 17862306a36Sopenharmony_ci u32 version; /* XLB + 0x44 */ 17962306a36Sopenharmony_ci u32 status; /* XLB + 0x48 */ 18062306a36Sopenharmony_ci u32 int_enable; /* XLB + 0x4c */ 18162306a36Sopenharmony_ci u32 addr_capture; /* XLB + 0x50 */ 18262306a36Sopenharmony_ci u32 bus_sig_capture; /* XLB + 0x54 */ 18362306a36Sopenharmony_ci u32 addr_timeout; /* XLB + 0x58 */ 18462306a36Sopenharmony_ci u32 data_timeout; /* XLB + 0x5c */ 18562306a36Sopenharmony_ci u32 bus_act_timeout; /* XLB + 0x60 */ 18662306a36Sopenharmony_ci u32 master_pri_enable; /* XLB + 0x64 */ 18762306a36Sopenharmony_ci u32 master_priority; /* XLB + 0x68 */ 18862306a36Sopenharmony_ci u32 base_address; /* XLB + 0x6c */ 18962306a36Sopenharmony_ci u32 snoop_window; /* XLB + 0x70 */ 19062306a36Sopenharmony_ci}; 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci#define MPC52xx_XLB_CFG_PLDIS (1 << 31) 19362306a36Sopenharmony_ci#define MPC52xx_XLB_CFG_SNOOP (1 << 15) 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci/* Clock Distribution control */ 19662306a36Sopenharmony_cistruct mpc52xx_cdm { 19762306a36Sopenharmony_ci u32 jtag_id; /* CDM + 0x00 reg0 read only */ 19862306a36Sopenharmony_ci u32 rstcfg; /* CDM + 0x04 reg1 read only */ 19962306a36Sopenharmony_ci u32 breadcrumb; /* CDM + 0x08 reg2 */ 20062306a36Sopenharmony_ci 20162306a36Sopenharmony_ci u8 mem_clk_sel; /* CDM + 0x0c reg3 byte0 */ 20262306a36Sopenharmony_ci u8 xlb_clk_sel; /* CDM + 0x0d reg3 byte1 read only */ 20362306a36Sopenharmony_ci u8 ipb_clk_sel; /* CDM + 0x0e reg3 byte2 */ 20462306a36Sopenharmony_ci u8 pci_clk_sel; /* CDM + 0x0f reg3 byte3 */ 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci u8 ext_48mhz_en; /* CDM + 0x10 reg4 byte0 */ 20762306a36Sopenharmony_ci u8 fd_enable; /* CDM + 0x11 reg4 byte1 */ 20862306a36Sopenharmony_ci u16 fd_counters; /* CDM + 0x12 reg4 byte2,3 */ 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ci u32 clk_enables; /* CDM + 0x14 reg5 */ 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci u8 osc_disable; /* CDM + 0x18 reg6 byte0 */ 21362306a36Sopenharmony_ci u8 reserved0[3]; /* CDM + 0x19 reg6 byte1,2,3 */ 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci u8 ccs_sleep_enable; /* CDM + 0x1c reg7 byte0 */ 21662306a36Sopenharmony_ci u8 osc_sleep_enable; /* CDM + 0x1d reg7 byte1 */ 21762306a36Sopenharmony_ci u8 reserved1; /* CDM + 0x1e reg7 byte2 */ 21862306a36Sopenharmony_ci u8 ccs_qreq_test; /* CDM + 0x1f reg7 byte3 */ 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci u8 soft_reset; /* CDM + 0x20 u8 byte0 */ 22162306a36Sopenharmony_ci u8 no_ckstp; /* CDM + 0x21 u8 byte0 */ 22262306a36Sopenharmony_ci u8 reserved2[2]; /* CDM + 0x22 u8 byte1,2,3 */ 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci u8 pll_lock; /* CDM + 0x24 reg9 byte0 */ 22562306a36Sopenharmony_ci u8 pll_looselock; /* CDM + 0x25 reg9 byte1 */ 22662306a36Sopenharmony_ci u8 pll_sm_lockwin; /* CDM + 0x26 reg9 byte2 */ 22762306a36Sopenharmony_ci u8 reserved3; /* CDM + 0x27 reg9 byte3 */ 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci u16 reserved4; /* CDM + 0x28 reg10 byte0,1 */ 23062306a36Sopenharmony_ci u16 mclken_div_psc1; /* CDM + 0x2a reg10 byte2,3 */ 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ci u16 reserved5; /* CDM + 0x2c reg11 byte0,1 */ 23362306a36Sopenharmony_ci u16 mclken_div_psc2; /* CDM + 0x2e reg11 byte2,3 */ 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci u16 reserved6; /* CDM + 0x30 reg12 byte0,1 */ 23662306a36Sopenharmony_ci u16 mclken_div_psc3; /* CDM + 0x32 reg12 byte2,3 */ 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci u16 reserved7; /* CDM + 0x34 reg13 byte0,1 */ 23962306a36Sopenharmony_ci u16 mclken_div_psc6; /* CDM + 0x36 reg13 byte2,3 */ 24062306a36Sopenharmony_ci}; 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_ci/* Interrupt controller Register set */ 24362306a36Sopenharmony_cistruct mpc52xx_intr { 24462306a36Sopenharmony_ci u32 per_mask; /* INTR + 0x00 */ 24562306a36Sopenharmony_ci u32 per_pri1; /* INTR + 0x04 */ 24662306a36Sopenharmony_ci u32 per_pri2; /* INTR + 0x08 */ 24762306a36Sopenharmony_ci u32 per_pri3; /* INTR + 0x0c */ 24862306a36Sopenharmony_ci u32 ctrl; /* INTR + 0x10 */ 24962306a36Sopenharmony_ci u32 main_mask; /* INTR + 0x14 */ 25062306a36Sopenharmony_ci u32 main_pri1; /* INTR + 0x18 */ 25162306a36Sopenharmony_ci u32 main_pri2; /* INTR + 0x1c */ 25262306a36Sopenharmony_ci u32 reserved1; /* INTR + 0x20 */ 25362306a36Sopenharmony_ci u32 enc_status; /* INTR + 0x24 */ 25462306a36Sopenharmony_ci u32 crit_status; /* INTR + 0x28 */ 25562306a36Sopenharmony_ci u32 main_status; /* INTR + 0x2c */ 25662306a36Sopenharmony_ci u32 per_status; /* INTR + 0x30 */ 25762306a36Sopenharmony_ci u32 reserved2; /* INTR + 0x34 */ 25862306a36Sopenharmony_ci u32 per_error; /* INTR + 0x38 */ 25962306a36Sopenharmony_ci}; 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci/* ========================================================================= */ 26562306a36Sopenharmony_ci/* Prototypes for MPC52xx sysdev */ 26662306a36Sopenharmony_ci/* ========================================================================= */ 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_cistruct device_node; 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci/* mpc52xx_common.c */ 27362306a36Sopenharmony_ciextern void mpc5200_setup_xlb_arbiter(void); 27462306a36Sopenharmony_ciextern void mpc52xx_declare_of_platform_devices(void); 27562306a36Sopenharmony_ciextern int mpc5200_psc_ac97_gpio_reset(int psc_number); 27662306a36Sopenharmony_ciextern void mpc52xx_map_common_devices(void); 27762306a36Sopenharmony_ciextern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); 27862306a36Sopenharmony_ciextern void __noreturn mpc52xx_restart(char *cmd); 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_ci/* mpc52xx_gpt.c */ 28162306a36Sopenharmony_cistruct mpc52xx_gpt_priv; 28262306a36Sopenharmony_ciextern struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq); 28362306a36Sopenharmony_ciextern int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, u64 period, 28462306a36Sopenharmony_ci int continuous); 28562306a36Sopenharmony_ciextern u64 mpc52xx_gpt_timer_period(struct mpc52xx_gpt_priv *gpt); 28662306a36Sopenharmony_ciextern int mpc52xx_gpt_stop_timer(struct mpc52xx_gpt_priv *gpt); 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci/* mpc52xx_pic.c */ 28962306a36Sopenharmony_ciextern void mpc52xx_init_irq(void); 29062306a36Sopenharmony_ciextern unsigned int mpc52xx_get_irq(void); 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci/* mpc52xx_pci.c */ 29362306a36Sopenharmony_ci#ifdef CONFIG_PCI 29462306a36Sopenharmony_ciextern int __init mpc52xx_add_bridge(struct device_node *node); 29562306a36Sopenharmony_ciextern void __init mpc52xx_setup_pci(void); 29662306a36Sopenharmony_ci#else 29762306a36Sopenharmony_cistatic inline void mpc52xx_setup_pci(void) { } 29862306a36Sopenharmony_ci#endif 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_ci#ifdef CONFIG_PM 30362306a36Sopenharmony_cistruct mpc52xx_suspend { 30462306a36Sopenharmony_ci void (*board_suspend_prepare)(void __iomem *mbar); 30562306a36Sopenharmony_ci void (*board_resume_finish)(void __iomem *mbar); 30662306a36Sopenharmony_ci}; 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_ciextern struct mpc52xx_suspend mpc52xx_suspend; 30962306a36Sopenharmony_ciextern int __init mpc52xx_pm_init(void); 31062306a36Sopenharmony_ciextern int mpc52xx_set_wakeup_gpio(u8 pin, u8 level); 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ci/* lite5200 calls mpc5200 suspend functions, so here they are */ 31362306a36Sopenharmony_ciextern int mpc52xx_pm_prepare(void); 31462306a36Sopenharmony_ciextern int mpc52xx_pm_enter(suspend_state_t); 31562306a36Sopenharmony_ciextern void mpc52xx_pm_finish(void); 31662306a36Sopenharmony_ciextern char saved_sram[0x4000]; /* reuse buffer from mpc52xx suspend */ 31762306a36Sopenharmony_ci 31862306a36Sopenharmony_ci#ifdef CONFIG_PPC_LITE5200 31962306a36Sopenharmony_ciint __init lite5200_pm_init(void); 32062306a36Sopenharmony_ci#endif 32162306a36Sopenharmony_ci#endif /* CONFIG_PM */ 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_ci#endif /* __ASM_POWERPC_MPC52xx_H__ */ 32462306a36Sopenharmony_ci 325