Path: blob/master/arch/blackfin/mach-bf527/include/mach/bf527.h
10820 views
/*1* Copyright 2007-2009 Analog Devices Inc.2*3* Licensed under the GPL-2 or later.4*/56#ifndef __MACH_BF527_H__7#define __MACH_BF527_H__89#define OFFSET_(x) ((x) & 0x0000FFFF)1011/*some misc defines*/12#define IMASK_IVG15 0x800013#define IMASK_IVG14 0x400014#define IMASK_IVG13 0x200015#define IMASK_IVG12 0x10001617#define IMASK_IVG11 0x080018#define IMASK_IVG10 0x040019#define IMASK_IVG9 0x020020#define IMASK_IVG8 0x01002122#define IMASK_IVG7 0x008023#define IMASK_IVGTMR 0x004024#define IMASK_IVGHW 0x00202526/***************************/2728#define BFIN_DSUBBANKS 429#define BFIN_DWAYS 230#define BFIN_DLINES 6431#define BFIN_ISUBBANKS 432#define BFIN_IWAYS 433#define BFIN_ILINES 323435#define WAY0_L 0x136#define WAY1_L 0x237#define WAY01_L 0x338#define WAY2_L 0x439#define WAY02_L 0x540#define WAY12_L 0x641#define WAY012_L 0x74243#define WAY3_L 0x844#define WAY03_L 0x945#define WAY13_L 0xA46#define WAY013_L 0xB4748#define WAY32_L 0xC49#define WAY320_L 0xD50#define WAY321_L 0xE51#define WAYALL_L 0xF5253#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */5455/********************************* EBIU Settings ************************************/56#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)57#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)5859#ifdef CONFIG_C_AMBEN_ALL60#define V_AMBEN AMBEN_ALL61#endif62#ifdef CONFIG_C_AMBEN63#define V_AMBEN 0x064#endif65#ifdef CONFIG_C_AMBEN_B066#define V_AMBEN AMBEN_B067#endif68#ifdef CONFIG_C_AMBEN_B0_B169#define V_AMBEN AMBEN_B0_B170#endif71#ifdef CONFIG_C_AMBEN_B0_B1_B272#define V_AMBEN AMBEN_B0_B1_B273#endif74#ifdef CONFIG_C_AMCKEN75#define V_AMCKEN AMCKEN76#else77#define V_AMCKEN 0x078#endif79#ifdef CONFIG_C_CDPRIO80#define V_CDPRIO 0x10081#else82#define V_CDPRIO 0x083#endif8485#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)8687/**************************** Hysteresis Settings ****************************/8889#ifdef CONFIG_BFIN_HYSTERESIS_CONTROL90#ifdef CONFIG_GPIO_HYST_PORTF_0_791#define HYST_PORTF_0_7 (1 << 0)92#else93#define HYST_PORTF_0_7 (0 << 0)94#endif95#ifdef CONFIG_GPIO_HYST_PORTF_8_996#define HYST_PORTF_8_9 (1 << 2)97#else98#define HYST_PORTF_8_9 (0 << 2)99#endif100#ifdef CONFIG_GPIO_HYST_PORTF_10101#define HYST_PORTF_10 (1 << 4)102#else103#define HYST_PORTF_10 (0 << 4)104#endif105#ifdef CONFIG_GPIO_HYST_PORTF_11106#define HYST_PORTF_11 (1 << 6)107#else108#define HYST_PORTF_11 (0 << 6)109#endif110#ifdef CONFIG_GPIO_HYST_PORTF_12_13111#define HYST_PORTF_12_13 (1 << 8)112#else113#define HYST_PORTF_12_13 (0 << 8)114#endif115#ifdef CONFIG_GPIO_HYST_PORTF_14_15116#define HYST_PORTF_14_15 (1 << 10)117#else118#define HYST_PORTF_14_15 (0 << 10)119#endif120121#define HYST_PORTF_0_15 (HYST_PORTF_0_7 | HYST_PORTF_8_9 | HYST_PORTF_10 | \122HYST_PORTF_11 | HYST_PORTF_12_13 | HYST_PORTF_14_15)123124#ifdef CONFIG_GPIO_HYST_PORTG_0125#define HYST_PORTG_0 (1 << 0)126#else127#define HYST_PORTG_0 (0 << 0)128#endif129#ifdef CONFIG_GPIO_HYST_PORTG_1_4130#define HYST_PORTG_1_4 (1 << 2)131#else132#define HYST_PORTG_1_4 (0 << 2)133#endif134#ifdef CONFIG_GPIO_HYST_PORTG_5_6135#define HYST_PORTG_5_6 (1 << 4)136#else137#define HYST_PORTG_5_6 (0 << 4)138#endif139#ifdef CONFIG_GPIO_HYST_PORTG_7_8140#define HYST_PORTG_7_8 (1 << 6)141#else142#define HYST_PORTG_7_8 (0 << 6)143#endif144#ifdef CONFIG_GPIO_HYST_PORTG_9145#define HYST_PORTG_9 (1 << 8)146#else147#define HYST_PORTG_9 (0 << 8)148#endif149#ifdef CONFIG_GPIO_HYST_PORTG_10150#define HYST_PORTG_10 (1 << 10)151#else152#define HYST_PORTG_10 (0 << 10)153#endif154#ifdef CONFIG_GPIO_HYST_PORTG_11_13155#define HYST_PORTG_11_13 (1 << 12)156#else157#define HYST_PORTG_11_13 (0 << 12)158#endif159#ifdef CONFIG_GPIO_HYST_PORTG_14_15160#define HYST_PORTG_14_15 (1 << 14)161#else162#define HYST_PORTG_14_15 (0 << 14)163#endif164165#define HYST_PORTG_0_15 (HYST_PORTG_0 | HYST_PORTG_1_4 | HYST_PORTG_5_6 | \166HYST_PORTG_7_8 | HYST_PORTG_9 | HYST_PORTG_10 | \167HYST_PORTG_11_13 | HYST_PORTG_14_15)168169#ifdef CONFIG_GPIO_HYST_PORTH_0_7170#define HYST_PORTH_0_7 (1 << 0)171#else172#define HYST_PORTH_0_7 (0 << 0)173#endif174#ifdef CONFIG_GPIO_HYST_PORTH_8175#define HYST_PORTH_8 (1 << 2)176#else177#define HYST_PORTH_8 (0 << 2)178#endif179#ifdef CONFIG_GPIO_HYST_PORTH_9_15180#define HYST_PORTH_9_15 (1 << 4)181#else182#define HYST_PORTH_9_15 (0 << 4)183#endif184185#define HYST_PORTH_0_15 (HYST_PORTH_0_7 | HYST_PORTH_8 | HYST_PORTH_9_15)186187#ifdef CONFIG_NONEGPIO_HYST_TMR0_FS1_PPICLK188#define HYST_TMR0_FS1_PPICLK (1 << 0)189#else190#define HYST_TMR0_FS1_PPICLK (0 << 0)191#endif192#ifdef CONFIG_NONEGPIO_HYST_NMI_RST_BMODE193#define HYST_NMI_RST_BMODE (1 << 2)194#else195#define HYST_NMI_RST_BMODE (0 << 2)196#endif197#ifdef CONFIG_NONEGPIO_HYST_JTAG198#define HYST_JTAG (1 << 4)199#else200#define HYST_JTAG (0 << 4)201#endif202203#define HYST_NONEGPIO (HYST_TMR0_FS1_PPICLK | HYST_NMI_RST_BMODE | HYST_JTAG)204#define HYST_NONEGPIO_MASK (0x3F)205#endif /* CONFIG_BFIN_HYSTERESIS_CONTROL */206207#ifdef CONFIG_BF527208#define CPU "BF527"209#define CPUID 0x27e0210#endif211#ifdef CONFIG_BF526212#define CPU "BF526"213#define CPUID 0x27e4214#endif215#ifdef CONFIG_BF525216#define CPU "BF525"217#define CPUID 0x27e0218#endif219#ifdef CONFIG_BF524220#define CPU "BF524"221#define CPUID 0x27e4222#endif223#ifdef CONFIG_BF523224#define CPU "BF523"225#define CPUID 0x27e0226#endif227#ifdef CONFIG_BF522228#define CPU "BF522"229#define CPUID 0x27e4230#endif231232#ifndef CPU233#error "Unknown CPU type - This kernel doesn't seem to be configured properly"234#endif235236#endif /* __MACH_BF527_H__ */237238239