Path: blob/master/arch/blackfin/mach-bf518/include/mach/bf518.h
10820 views
/*1* Copyright 2008 Analog Devices Inc.2*3* Licensed under the GPL-2 or later.4*/56#ifndef __MACH_BF518_H__7#define __MACH_BF518_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#endif174175#define HYST_PORTH_0_15 (HYST_PORTH_0_7)176177#ifdef CONFIG_NONEGPIO_HYST_NMI_RST_BMODE178#define HYST_NMI_RST_BMODE (1 << 2)179#else180#define HYST_NMI_RST_BMODE (0 << 2)181#endif182#ifdef CONFIG_NONEGPIO_HYST_JTAG183#define HYST_JTAG (1 << 4)184#else185#define HYST_JTAG (0 << 4)186#endif187188#define HYST_NONEGPIO (HYST_NMI_RST_BMODE | HYST_JTAG)189#define HYST_NONEGPIO_MASK (0x3C)190#endif /* CONFIG_BFIN_HYSTERESIS_CONTROL */191192#ifdef CONFIG_BF518193#define CPU "BF518"194#define CPUID 0x27e8195#endif196#ifdef CONFIG_BF516197#define CPU "BF516"198#define CPUID 0x27e8199#endif200#ifdef CONFIG_BF514201#define CPU "BF514"202#define CPUID 0x27e8203#endif204#ifdef CONFIG_BF512205#define CPU "BF512"206#define CPUID 0x27e8207#endif208209#ifndef CPU210#error "Unknown CPU type - This kernel doesn't seem to be configured properly"211#endif212213#endif /* __MACH_BF518_H__ */214215216