You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits) Blackfin serial driver: supporting BF548-EZKIT serial port Video Console: Blackfin doesnt support VGA console Blackfin arch: Add peripheral io API to gpio header file Blackfin arch: set up gpio interrupt IRQ_PJ9 for BF54x ATAPI PATA driver Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging Blackfin arch: as pointed out by Robert P. J. Day, update the CPU_FREQ name to match current Kconfig Blackfin arch: extract the entry point from the linked kernel Blackfin arch: clean up some coding style issues Blackfin arch: combine the common code of free_initrd_mem and free_initmem Blackfin arch: Add Support for Peripheral PortMux and resouce allocation Blackfin arch: use PAGE_SIZE when doing aligns rather than hardcoded values Blackfin arch: fix bug set dma_address properly in dma_map_sg Blackfin arch: Disable CACHELINE_ALIGNED_L1 for BF54x by default Blackfin arch: Port the dm9000 driver to Blackfin by using the correct low-level io routines Blackfin arch: There is no CDPRIO Bit in the EBIU_AMGCTL Register of BF54x arch Blackfin arch: scrub dead code Blackfin arch: Fix Warning add some defines in BF54x header file Blackfin arch: add BF54x missing GPIO access functions Blackfin arch: Some memory and code optimizations - Fix SYS_IRQS Blackfin arch: Enable BF54x PIN/GPIO interrupts ...
This commit is contained in:
@@ -1 +1,3 @@
|
||||
include include/asm-generic/Kbuild.asm
|
||||
|
||||
header-y += fixed_code.h
|
||||
|
||||
@@ -67,6 +67,18 @@ extern void evt14_softirq(void);
|
||||
extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
|
||||
extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
|
||||
|
||||
extern asmlinkage void finish_atomic_sections (struct pt_regs *regs);
|
||||
extern char fixed_code_start;
|
||||
extern char fixed_code_end;
|
||||
extern int atomic_xchg32(void);
|
||||
extern int atomic_cas32(void);
|
||||
extern int atomic_add32(void);
|
||||
extern int atomic_sub32(void);
|
||||
extern int atomic_ior32(void);
|
||||
extern int atomic_and32(void);
|
||||
extern int atomic_xor32(void);
|
||||
extern void sigreturn_stub(void);
|
||||
|
||||
extern void *l1_data_A_sram_alloc(size_t);
|
||||
extern void *l1_data_B_sram_alloc(size_t);
|
||||
extern void *l1_inst_sram_alloc(size_t);
|
||||
|
||||
+13
-120
@@ -57,8 +57,8 @@ struct cplb_tab {
|
||||
u16 size;
|
||||
};
|
||||
|
||||
u_long icplb_table[MAX_CPLBS+1];
|
||||
u_long dcplb_table[MAX_CPLBS+1];
|
||||
extern u_long icplb_table[MAX_CPLBS+1];
|
||||
extern u_long dcplb_table[MAX_CPLBS+1];
|
||||
|
||||
/* Till here we are discussing about the static memory management model.
|
||||
* However, the operating envoronments commonly define more CPLB
|
||||
@@ -70,134 +70,27 @@ u_long dcplb_table[MAX_CPLBS+1];
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CPLB_SWITCH_TAB_L1
|
||||
u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data));
|
||||
u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data));
|
||||
extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data));
|
||||
extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data));
|
||||
|
||||
#ifdef CONFIG_CPLB_INFO
|
||||
u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data));
|
||||
u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data));
|
||||
extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data));
|
||||
extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data));
|
||||
#endif /* CONFIG_CPLB_INFO */
|
||||
|
||||
#else
|
||||
|
||||
u_long ipdt_table[MAX_SWITCH_I_CPLBS+1];
|
||||
u_long dpdt_table[MAX_SWITCH_D_CPLBS+1];
|
||||
extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1];
|
||||
extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1];
|
||||
|
||||
#ifdef CONFIG_CPLB_INFO
|
||||
u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS];
|
||||
u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS];
|
||||
extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS];
|
||||
extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS];
|
||||
#endif /* CONFIG_CPLB_INFO */
|
||||
|
||||
#endif /*CONFIG_CPLB_SWITCH_TAB_L1*/
|
||||
|
||||
struct s_cplb {
|
||||
struct cplb_tab init_i;
|
||||
struct cplb_tab init_d;
|
||||
struct cplb_tab switch_i;
|
||||
struct cplb_tab switch_d;
|
||||
};
|
||||
extern unsigned long reserved_mem_dcache_on;
|
||||
extern unsigned long reserved_mem_icache_on;
|
||||
|
||||
#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
|
||||
static struct cplb_desc cplb_data[] = {
|
||||
{
|
||||
.start = 0,
|
||||
.end = SIZE_4K,
|
||||
.psize = SIZE_4K,
|
||||
.attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
|
||||
.i_conf = SDRAM_OOPS,
|
||||
.d_conf = SDRAM_OOPS,
|
||||
#if defined(CONFIG_DEBUG_HUNT_FOR_ZERO)
|
||||
.valid = 1,
|
||||
#else
|
||||
.valid = 0,
|
||||
#endif
|
||||
.name = "ZERO Pointer Saveguard",
|
||||
},
|
||||
{
|
||||
.start = L1_CODE_START,
|
||||
.end = L1_CODE_START + L1_CODE_LENGTH,
|
||||
.psize = SIZE_4M,
|
||||
.attr = INITIAL_T | SWITCH_T | I_CPLB,
|
||||
.i_conf = L1_IMEMORY,
|
||||
.d_conf = 0,
|
||||
.valid = 1,
|
||||
.name = "L1 I-Memory",
|
||||
},
|
||||
{
|
||||
.start = L1_DATA_A_START,
|
||||
.end = L1_DATA_B_START + L1_DATA_B_LENGTH,
|
||||
.psize = SIZE_4M,
|
||||
.attr = INITIAL_T | SWITCH_T | D_CPLB,
|
||||
.i_conf = 0,
|
||||
.d_conf = L1_DMEMORY,
|
||||
#if ((L1_DATA_A_LENGTH > 0) || (L1_DATA_B_LENGTH > 0))
|
||||
.valid = 1,
|
||||
#else
|
||||
.valid = 0,
|
||||
#endif
|
||||
.name = "L1 D-Memory",
|
||||
},
|
||||
{
|
||||
.start = 0,
|
||||
.end = 0, /* dynamic */
|
||||
.psize = 0,
|
||||
.attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB,
|
||||
.i_conf = SDRAM_IGENERIC,
|
||||
.d_conf = SDRAM_DGENERIC,
|
||||
.valid = 1,
|
||||
.name = "SDRAM Kernel",
|
||||
},
|
||||
{
|
||||
.start = 0, /* dynamic */
|
||||
.end = 0, /* dynamic */
|
||||
.psize = 0,
|
||||
.attr = INITIAL_T | SWITCH_T | D_CPLB,
|
||||
.i_conf = SDRAM_IGENERIC,
|
||||
.d_conf = SDRAM_DNON_CHBL,
|
||||
.valid = 1,
|
||||
.name = "SDRAM RAM MTD",
|
||||
},
|
||||
{
|
||||
.start = 0, /* dynamic */
|
||||
.end = 0, /* dynamic */
|
||||
.psize = SIZE_1M,
|
||||
.attr = INITIAL_T | SWITCH_T | D_CPLB,
|
||||
.d_conf = SDRAM_DNON_CHBL,
|
||||
.valid = 1,//(DMA_UNCACHED_REGION > 0),
|
||||
.name = "SDRAM Uncached DMA ZONE",
|
||||
},
|
||||
{
|
||||
.start = 0, /* dynamic */
|
||||
.end = 0, /* dynamic */
|
||||
.psize = 0,
|
||||
.attr = SWITCH_T | D_CPLB,
|
||||
.i_conf = 0, /* dynamic */
|
||||
.d_conf = 0, /* dynamic */
|
||||
.valid = 1,
|
||||
.name = "SDRAM Reserved Memory",
|
||||
},
|
||||
{
|
||||
.start = ASYNC_BANK0_BASE,
|
||||
.end = ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE,
|
||||
.psize = 0,
|
||||
.attr = SWITCH_T | D_CPLB,
|
||||
.d_conf = SDRAM_EBIU,
|
||||
.valid = 1,
|
||||
.name = "ASYNC Memory",
|
||||
},
|
||||
{
|
||||
#if defined(CONFIG_BF561)
|
||||
.start = L2_SRAM,
|
||||
.end = L2_SRAM_END,
|
||||
.psize = SIZE_1M,
|
||||
.attr = SWITCH_T | D_CPLB,
|
||||
.i_conf = L2_MEMORY,
|
||||
.d_conf = L2_MEMORY,
|
||||
.valid = 1,
|
||||
#else
|
||||
.valid = 0,
|
||||
#endif
|
||||
.name = "L2 Memory",
|
||||
}
|
||||
};
|
||||
#endif
|
||||
extern void generate_cpl_tables(void);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* This file defines the fixed addresses where userspace programs can find
|
||||
atomic code sequences. */
|
||||
|
||||
#define FIXED_CODE_START 0x400
|
||||
|
||||
#define SIGRETURN_STUB 0x400
|
||||
|
||||
#define ATOMIC_SEQS_START 0x410
|
||||
|
||||
#define ATOMIC_XCHG32 0x410
|
||||
#define ATOMIC_CAS32 0x420
|
||||
#define ATOMIC_ADD32 0x430
|
||||
#define ATOMIC_SUB32 0x440
|
||||
#define ATOMIC_IOR32 0x450
|
||||
#define ATOMIC_AND32 0x460
|
||||
#define ATOMIC_XOR32 0x470
|
||||
|
||||
#define ATOMIC_SEQS_END 0x480
|
||||
|
||||
#define FIXED_CODE_END 0x480
|
||||
@@ -204,8 +204,62 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BF548_FAMILY
|
||||
#include <asm-blackfin/mach-bf548/gpio.h>
|
||||
#endif
|
||||
|
||||
#ifdef BF561_FAMILY
|
||||
#define MAX_BLACKFIN_GPIOS 48
|
||||
|
||||
#define GPIO_PF0 0
|
||||
#define GPIO_PF1 1
|
||||
#define GPIO_PF2 2
|
||||
#define GPIO_PF3 3
|
||||
#define GPIO_PF4 4
|
||||
#define GPIO_PF5 5
|
||||
#define GPIO_PF6 6
|
||||
#define GPIO_PF7 7
|
||||
#define GPIO_PF8 8
|
||||
#define GPIO_PF9 9
|
||||
#define GPIO_PF10 10
|
||||
#define GPIO_PF11 11
|
||||
#define GPIO_PF12 12
|
||||
#define GPIO_PF13 13
|
||||
#define GPIO_PF14 14
|
||||
#define GPIO_PF15 15
|
||||
#define GPIO_PF16 16
|
||||
#define GPIO_PF17 17
|
||||
#define GPIO_PF18 18
|
||||
#define GPIO_PF19 19
|
||||
#define GPIO_PF20 20
|
||||
#define GPIO_PF21 21
|
||||
#define GPIO_PF22 22
|
||||
#define GPIO_PF23 23
|
||||
#define GPIO_PF24 24
|
||||
#define GPIO_PF25 25
|
||||
#define GPIO_PF26 26
|
||||
#define GPIO_PF27 27
|
||||
#define GPIO_PF28 28
|
||||
#define GPIO_PF29 29
|
||||
#define GPIO_PF30 30
|
||||
#define GPIO_PF31 31
|
||||
#define GPIO_PF32 32
|
||||
#define GPIO_PF33 33
|
||||
#define GPIO_PF34 34
|
||||
#define GPIO_PF35 35
|
||||
#define GPIO_PF36 36
|
||||
#define GPIO_PF37 37
|
||||
#define GPIO_PF38 38
|
||||
#define GPIO_PF39 39
|
||||
#define GPIO_PF40 40
|
||||
#define GPIO_PF41 41
|
||||
#define GPIO_PF42 42
|
||||
#define GPIO_PF43 43
|
||||
#define GPIO_PF44 44
|
||||
#define GPIO_PF45 45
|
||||
#define GPIO_PF46 46
|
||||
#define GPIO_PF47 47
|
||||
|
||||
#define PORT_FIO0 GPIO_0
|
||||
#define PORT_FIO1 GPIO_16
|
||||
#define PORT_FIO2 GPIO_32
|
||||
@@ -230,6 +284,7 @@
|
||||
* MODIFICATION HISTORY :
|
||||
**************************************************************/
|
||||
|
||||
#ifndef BF548_FAMILY
|
||||
void set_gpio_dir(unsigned short, unsigned short);
|
||||
void set_gpio_inen(unsigned short, unsigned short);
|
||||
void set_gpio_polar(unsigned short, unsigned short);
|
||||
@@ -299,6 +354,7 @@ struct gpio_port_t {
|
||||
unsigned short dummy16;
|
||||
unsigned short inen;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#define PM_WAKE_RISING 0x1
|
||||
@@ -357,8 +413,10 @@ void gpio_free(unsigned short);
|
||||
void gpio_set_value(unsigned short gpio, unsigned short arg);
|
||||
unsigned short gpio_get_value(unsigned short gpio);
|
||||
|
||||
#ifndef BF548_FAMILY
|
||||
#define gpio_get_value(gpio) get_gpio_data(gpio)
|
||||
#define gpio_set_value(gpio, value) set_gpio_data(gpio, value)
|
||||
#endif
|
||||
|
||||
void gpio_direction_input(unsigned short gpio);
|
||||
void gpio_direction_output(unsigned short gpio);
|
||||
|
||||
@@ -28,7 +28,11 @@ typedef struct {
|
||||
* SOFTIRQ_MASK: 0x00ff0000
|
||||
*/
|
||||
|
||||
#if NR_IRQS > 256
|
||||
#define HARDIRQ_BITS 9
|
||||
#else
|
||||
#define HARDIRQ_BITS 8
|
||||
#endif
|
||||
|
||||
#ifdef NR_IRQS
|
||||
# if (1 << HARDIRQ_BITS) < NR_IRQS
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* File: include/asm-blackfin/kgdb.h
|
||||
* Based on:
|
||||
* Author: Sonic Zhang
|
||||
*
|
||||
* Created:
|
||||
* Description:
|
||||
*
|
||||
* Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $
|
||||
*
|
||||
* Modified:
|
||||
* Copyright 2005-2006 Analog Devices Inc.
|
||||
*
|
||||
* Bugs: Enter bugs at http://blackfin.uclinux.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see the file COPYING, or write
|
||||
* to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __ASM_BLACKFIN_KGDB_H__
|
||||
#define __ASM_BLACKFIN_KGDB_H__
|
||||
|
||||
#include <linux/ptrace.h>
|
||||
|
||||
/* gdb locks */
|
||||
#define KGDB_MAX_NO_CPUS 8
|
||||
|
||||
/************************************************************************/
|
||||
/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
|
||||
/* at least NUMREGBYTES*2 are needed for register packets */
|
||||
/* Longer buffer is needed to list all threads */
|
||||
#define BUFMAX 2048
|
||||
|
||||
/*
|
||||
* Note that this register image is different from
|
||||
* the register image that Linux produces at interrupt time.
|
||||
*
|
||||
* Linux's register image is defined by struct pt_regs in ptrace.h.
|
||||
*/
|
||||
enum regnames {
|
||||
/* Core Registers */
|
||||
BFIN_R0 = 0,
|
||||
BFIN_R1,
|
||||
BFIN_R2,
|
||||
BFIN_R3,
|
||||
BFIN_R4,
|
||||
BFIN_R5,
|
||||
BFIN_R6,
|
||||
BFIN_R7,
|
||||
BFIN_P0,
|
||||
BFIN_P1,
|
||||
BFIN_P2,
|
||||
BFIN_P3,
|
||||
BFIN_P4,
|
||||
BFIN_P5,
|
||||
BFIN_SP,
|
||||
BFIN_FP,
|
||||
BFIN_I0,
|
||||
BFIN_I1,
|
||||
BFIN_I2,
|
||||
BFIN_I3,
|
||||
BFIN_M0,
|
||||
BFIN_M1,
|
||||
BFIN_M2,
|
||||
BFIN_M3,
|
||||
BFIN_B0,
|
||||
BFIN_B1,
|
||||
BFIN_B2,
|
||||
BFIN_B3,
|
||||
BFIN_L0,
|
||||
BFIN_L1,
|
||||
BFIN_L2,
|
||||
BFIN_L3,
|
||||
BFIN_A0_DOT_X,
|
||||
BFIN_A0_DOT_W,
|
||||
BFIN_A1_DOT_X,
|
||||
BFIN_A1_DOT_W,
|
||||
BFIN_ASTAT,
|
||||
BFIN_RETS,
|
||||
BFIN_LC0,
|
||||
BFIN_LT0,
|
||||
BFIN_LB0,
|
||||
BFIN_LC1,
|
||||
BFIN_LT1,
|
||||
BFIN_LB1,
|
||||
BFIN_CYCLES,
|
||||
BFIN_CYCLES2,
|
||||
BFIN_USP,
|
||||
BFIN_SEQSTAT,
|
||||
BFIN_SYSCFG,
|
||||
BFIN_RETI,
|
||||
BFIN_RETX,
|
||||
BFIN_RETN,
|
||||
BFIN_RETE,
|
||||
|
||||
/* Pseudo Registers */
|
||||
BFIN_PC,
|
||||
BFIN_CC,
|
||||
BFIN_EXTRA1, /* Address of .text section. */
|
||||
BFIN_EXTRA2, /* Address of .data section. */
|
||||
BFIN_EXTRA3, /* Address of .bss section. */
|
||||
BFIN_FDPIC_EXEC,
|
||||
BFIN_FDPIC_INTERP,
|
||||
|
||||
/* MMRs */
|
||||
BFIN_IPEND,
|
||||
|
||||
/* LAST ENTRY SHOULD NOT BE CHANGED. */
|
||||
BFIN_NUM_REGS /* The number of all registers. */
|
||||
};
|
||||
|
||||
/* Number of bytes of registers. */
|
||||
#define NUMREGBYTES BFIN_NUM_REGS*4
|
||||
|
||||
#define BREAKPOINT() asm(" EXCPT 2;");
|
||||
#define BREAK_INSTR_SIZE 2
|
||||
#define HW_BREAKPOINT_NUM 6
|
||||
|
||||
/* Instruction watchpoint address control register bits mask */
|
||||
#define WPPWR 0x1
|
||||
#define WPIREN01 0x2
|
||||
#define WPIRINV01 0x4
|
||||
#define WPIAEN0 0x8
|
||||
#define WPIAEN1 0x10
|
||||
#define WPICNTEN0 0x20
|
||||
#define WPICNTEN1 0x40
|
||||
#define EMUSW0 0x80
|
||||
#define EMUSW1 0x100
|
||||
#define WPIREN23 0x200
|
||||
#define WPIRINV23 0x400
|
||||
#define WPIAEN2 0x800
|
||||
#define WPIAEN3 0x1000
|
||||
#define WPICNTEN2 0x2000
|
||||
#define WPICNTEN3 0x4000
|
||||
#define EMUSW2 0x8000
|
||||
#define EMUSW3 0x10000
|
||||
#define WPIREN45 0x20000
|
||||
#define WPIRINV45 0x40000
|
||||
#define WPIAEN4 0x80000
|
||||
#define WPIAEN5 0x100000
|
||||
#define WPICNTEN4 0x200000
|
||||
#define WPICNTEN5 0x400000
|
||||
#define EMUSW4 0x800000
|
||||
#define EMUSW5 0x1000000
|
||||
#define WPAND 0x2000000
|
||||
|
||||
/* Data watchpoint address control register bits mask */
|
||||
#define WPDREN01 0x1
|
||||
#define WPDRINV01 0x2
|
||||
#define WPDAEN0 0x4
|
||||
#define WPDAEN1 0x8
|
||||
#define WPDCNTEN0 0x10
|
||||
#define WPDCNTEN1 0x20
|
||||
#define WPDSRC0 0xc0
|
||||
#define WPDACC0 0x300
|
||||
#define WPDSRC1 0xc00
|
||||
#define WPDACC1 0x3000
|
||||
|
||||
/* Watchpoint status register bits mask */
|
||||
#define STATIA0 0x1
|
||||
#define STATIA1 0x2
|
||||
#define STATIA2 0x4
|
||||
#define STATIA3 0x8
|
||||
#define STATIA4 0x10
|
||||
#define STATIA5 0x20
|
||||
#define STATDA0 0x40
|
||||
#define STATDA1 0x80
|
||||
|
||||
extern void kgdb_print(const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
@@ -51,4 +51,7 @@
|
||||
#define CH_MEM_STREAM1_DEST 10 /* TX */
|
||||
#define CH_MEM_STREAM1_SRC 11 /* RX */
|
||||
|
||||
extern int channel2irq(unsigned int channel);
|
||||
extern struct dma_register *base_addr[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#ifndef _MACH_PORTMUX_H_
|
||||
#define _MACH_PORTMUX_H_
|
||||
|
||||
#define P_PPI0_CLK (P_DONTCARE)
|
||||
#define P_PPI0_FS1 (P_DONTCARE)
|
||||
#define P_PPI0_FS2 (P_DONTCARE)
|
||||
#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF3))
|
||||
#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF4))
|
||||
#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF5))
|
||||
#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PF6))
|
||||
#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PF7))
|
||||
#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PF8))
|
||||
#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PF9))
|
||||
#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PF10))
|
||||
#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PF11))
|
||||
#define P_PPI0_D0 (P_DONTCARE)
|
||||
#define P_PPI0_D1 (P_DONTCARE)
|
||||
#define P_PPI0_D2 (P_DONTCARE)
|
||||
#define P_PPI0_D3 (P_DONTCARE)
|
||||
#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PF15))
|
||||
#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PF14))
|
||||
#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PF13))
|
||||
#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PF12))
|
||||
|
||||
#define P_SPORT1_TSCLK (P_DONTCARE)
|
||||
#define P_SPORT1_RSCLK (P_DONTCARE)
|
||||
#define P_SPORT0_TSCLK (P_DONTCARE)
|
||||
#define P_SPORT0_RSCLK (P_DONTCARE)
|
||||
#define P_UART0_RX (P_DONTCARE)
|
||||
#define P_UART0_TX (P_DONTCARE)
|
||||
#define P_SPORT1_DRSEC (P_DONTCARE)
|
||||
#define P_SPORT1_RFS (P_DONTCARE)
|
||||
#define P_SPORT1_DTPRI (P_DONTCARE)
|
||||
#define P_SPORT1_DTSEC (P_DONTCARE)
|
||||
#define P_SPORT1_TFS (P_DONTCARE)
|
||||
#define P_SPORT1_DRPRI (P_DONTCARE)
|
||||
#define P_SPORT0_DRSEC (P_DONTCARE)
|
||||
#define P_SPORT0_RFS (P_DONTCARE)
|
||||
#define P_SPORT0_DTPRI (P_DONTCARE)
|
||||
#define P_SPORT0_DTSEC (P_DONTCARE)
|
||||
#define P_SPORT0_TFS (P_DONTCARE)
|
||||
#define P_SPORT0_DRPRI (P_DONTCARE)
|
||||
|
||||
#define P_SPI0_MOSI (P_DONTCARE)
|
||||
#define P_SPI0_MIS0 (P_DONTCARE)
|
||||
#define P_SPI0_SCK (P_DONTCARE)
|
||||
#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(GPIO_PF7))
|
||||
#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF6))
|
||||
#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5))
|
||||
#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF4))
|
||||
#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(GPIO_PF3))
|
||||
#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2))
|
||||
#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1))
|
||||
#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0))
|
||||
|
||||
#define P_TMR2 (P_DONTCARE)
|
||||
#define P_TMR1 (P_DONTCARE)
|
||||
#define P_TMR0 (P_DONTCARE)
|
||||
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* _MACH_PORTMUX_H_ */
|
||||
@@ -52,4 +52,7 @@
|
||||
#define CH_MEM_STREAM1_DEST 14 /* TX */
|
||||
#define CH_MEM_STREAM1_SRC 15 /* RX */
|
||||
|
||||
extern int channel2irq(unsigned int channel);
|
||||
extern struct dma_register *base_addr[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
#ifndef _MACH_PORTMUX_H_
|
||||
#define _MACH_PORTMUX_H_
|
||||
|
||||
#define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0))
|
||||
#define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0))
|
||||
#define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0))
|
||||
#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(0))
|
||||
#define P_TMR5 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(0))
|
||||
#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(0))
|
||||
#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(0))
|
||||
#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(0))
|
||||
#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(0))
|
||||
#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(0))
|
||||
#define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(0))
|
||||
#define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(0))
|
||||
#define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(0))
|
||||
#define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(0))
|
||||
#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(0))
|
||||
#define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(0))
|
||||
#define P_DMAR0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(1))
|
||||
#define P_DMAR1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(1))
|
||||
#define P_TMR7 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(1))
|
||||
#define P_TMR6 (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL6 (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL5 (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(1))
|
||||
#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(1))
|
||||
#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(1))
|
||||
#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1))
|
||||
#define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
|
||||
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
|
||||
|
||||
#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0))
|
||||
#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))
|
||||
#define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(0))
|
||||
#define P_PPI0_D3 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0))
|
||||
#define P_PPI0_D4 (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0))
|
||||
#define P_PPI0_D5 (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(0))
|
||||
#define P_PPI0_D6 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(0))
|
||||
#define P_PPI0_D7 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(0))
|
||||
#define P_PPI0_D8 (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(0))
|
||||
#define P_PPI0_D9 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(0))
|
||||
#define P_PPI0_D10 (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(0))
|
||||
#define P_PPI0_D11 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(0))
|
||||
#define P_PPI0_D12 (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(0))
|
||||
#define P_PPI0_D13 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(0))
|
||||
#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(0))
|
||||
#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(0))
|
||||
#define P_SPORT1_DRSEC (P_DEFINED | P_IDENT(GPIO_PG8) | P_FUNCT(1))
|
||||
#define P_SPORT1_DTSEC (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(1))
|
||||
#define P_SPORT1_RSCLK (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(1))
|
||||
#define P_SPORT1_RFS (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(1))
|
||||
#define P_SPORT1_DRPRI (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1))
|
||||
#define P_SPORT1_TSCLK (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1))
|
||||
#define P_SPORT1_TFS (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1))
|
||||
#define P_SPORT1_DTPRI (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1))
|
||||
|
||||
#define P_MII0_ETxD0 (P_DEFINED | P_IDENT(GPIO_PH0) | P_FUNCT(0))
|
||||
#define P_MII0_ETxD1 (P_DEFINED | P_IDENT(GPIO_PH1) | P_FUNCT(0))
|
||||
#define P_MII0_ETxD2 (P_DEFINED | P_IDENT(GPIO_PH2) | P_FUNCT(0))
|
||||
#define P_MII0_ETxD3 (P_DEFINED | P_IDENT(GPIO_PH3) | P_FUNCT(0))
|
||||
#define P_MII0_ETxEN (P_DEFINED | P_IDENT(GPIO_PH4) | P_FUNCT(0))
|
||||
#define P_MII0_TxCLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(0))
|
||||
#define P_MII0_PHYINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(0))
|
||||
#define P_MII0_COL (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(0))
|
||||
#define P_MII0_ERxD0 (P_DEFINED | P_IDENT(GPIO_PH8) | P_FUNCT(0))
|
||||
#define P_MII0_ERxD1 (P_DEFINED | P_IDENT(GPIO_PH9) | P_FUNCT(0))
|
||||
#define P_MII0_ERxD2 (P_DEFINED | P_IDENT(GPIO_PH10) | P_FUNCT(0))
|
||||
#define P_MII0_ERxD3 (P_DEFINED | P_IDENT(GPIO_PH11) | P_FUNCT(0))
|
||||
#define P_MII0_ERxDV (P_DEFINED | P_IDENT(GPIO_PH12) | P_FUNCT(0))
|
||||
#define P_MII0_ERxCLK (P_DEFINED | P_IDENT(GPIO_PH13) | P_FUNCT(0))
|
||||
#define P_MII0_ERxER (P_DEFINED | P_IDENT(GPIO_PH14) | P_FUNCT(0))
|
||||
#define P_MII0_CRS (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(0))
|
||||
#define P_RMII0_REF_CLK (P_DEFINED | P_IDENT(GPIO_PH5) | P_FUNCT(1))
|
||||
#define P_RMII0_MDINT (P_DEFINED | P_IDENT(GPIO_PH6) | P_FUNCT(1))
|
||||
#define P_RMII0_CRS_DV (P_DEFINED | P_IDENT(GPIO_PH15) | P_FUNCT(1))
|
||||
|
||||
#define PORT_PJ0 (GPIO_PH15 + 1)
|
||||
#define PORT_PJ1 (GPIO_PH15 + 2)
|
||||
#define PORT_PJ2 (GPIO_PH15 + 3)
|
||||
#define PORT_PJ3 (GPIO_PH15 + 4)
|
||||
#define PORT_PJ4 (GPIO_PH15 + 5)
|
||||
#define PORT_PJ5 (GPIO_PH15 + 6)
|
||||
#define PORT_PJ6 (GPIO_PH15 + 7)
|
||||
#define PORT_PJ7 (GPIO_PH15 + 8)
|
||||
#define PORT_PJ8 (GPIO_PH15 + 9)
|
||||
#define PORT_PJ9 (GPIO_PH15 + 10)
|
||||
#define PORT_PJ10 (GPIO_PH15 + 11)
|
||||
#define PORT_PJ11 (GPIO_PH15 + 12)
|
||||
|
||||
#define P_MDC (P_DEFINED | P_IDENT(PORT_PJ0) | P_FUNCT(0))
|
||||
#define P_MDIO (P_DEFINED | P_IDENT(PORT_PJ1) | P_FUNCT(0))
|
||||
#define P_TWI0_SCL (P_DEFINED | P_IDENT(PORT_PJ2) | P_FUNCT(0))
|
||||
#define P_TWI0_SDA (P_DEFINED | P_IDENT(PORT_PJ3) | P_FUNCT(0))
|
||||
#define P_SPORT0_DRSEC (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(0))
|
||||
#define P_SPORT0_DTSEC (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(0))
|
||||
#define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(PORT_PJ6) | P_FUNCT(0))
|
||||
#define P_SPORT0_RFS (P_DEFINED | P_IDENT(PORT_PJ7) | P_FUNCT(0))
|
||||
#define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0))
|
||||
#define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0))
|
||||
#define P_SPORT0_TFS (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0))
|
||||
#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
|
||||
#define P_CAN0_RX (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1))
|
||||
#define P_CAN0_TX (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL3 (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
|
||||
#define P_SPI0_SSEL7 (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2))
|
||||
|
||||
#endif /* _MACH_PORTMUX_H_ */
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
/*
|
||||
* File: include/asm-blackfin/mach-bf548/anomaly.h
|
||||
* Based on:
|
||||
* Author:
|
||||
*
|
||||
* Created:
|
||||
* Description:
|
||||
*
|
||||
* Rev:
|
||||
*
|
||||
* Modified:
|
||||
*
|
||||
*
|
||||
* Bugs: Enter bugs at http://blackfin.uclinux.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING.
|
||||
* If not, write to the Free Software Foundation,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _MACH_ANOMALY_H_
|
||||
#define _MACH_ANOMALY_H_
|
||||
#define ANOMALY_05000074 /* A multi issue instruction with dsp32shiftimm in
|
||||
slot1 and store of a P register in slot 2 is not
|
||||
supported */
|
||||
#define ANOMALY_05000119 /* DMA_RUN bit is not valid after a Peripheral Receive
|
||||
Channel DMA stops */
|
||||
#define ANOMALY_05000122 /* Rx.H can not be used to access 16-bit System MMR
|
||||
registers. */
|
||||
#define ANOMALY_05000245 /* Spurious Hardware Error from an Access in the
|
||||
Shadow of a Conditional Branch */
|
||||
#define ANOMALY_05000255 /* Entering Hibernate Mode with RTC Seconds event
|
||||
interrupt not functional */
|
||||
#define ANOMALY_05000265 /* Sensitivity to noise with slow input edge rates on
|
||||
SPORT external receive and transmit clocks. */
|
||||
#define ANOMALY_05000272 /* Certain data cache write through modes fail for
|
||||
VDDint <=0.9V */
|
||||
#define ANOMALY_05000281 /* False Hardware Error Exception when ISR context is
|
||||
not restored */
|
||||
#define ANOMALY_05000310 /* False Hardware Errors Caused by Fetches at the
|
||||
Boundary of Reserved Memory */
|
||||
#define ANOMALY_05000312 /* Errors When SSYNC, CSYNC, or Loads to LT, LB and
|
||||
LC Registers Are Interrupted */
|
||||
#define ANOMALY_05000324 /* TWI Slave Boot Mode Is Not Functional */
|
||||
#define ANOMALY_05000325 /* External FIFO Boot Mode Is Not Functional */
|
||||
#define ANOMALY_05000327 /* Data Lost When Core and DMA Accesses Are Made to
|
||||
the USB FIFO Simultaneously */
|
||||
#define ANOMALY_05000328 /* Incorrect Access of OTP_STATUS During otp_write()
|
||||
function */
|
||||
#define ANOMALY_05000329 /* Synchronous Burst Flash Boot Mode Is Not Functional
|
||||
*/
|
||||
#define ANOMALY_05000330 /* Host DMA Boot Mode Is Not Functional */
|
||||
#define ANOMALY_05000334 /* Inadequate Timing Margins on DDR DQS to DQ and DQM
|
||||
Skew */
|
||||
#define ANOMALY_05000335 /* Inadequate Rotary Debounce Logic Duration */
|
||||
#define ANOMALY_05000336 /* Phantom Interrupt Occurs After First Configuration
|
||||
of Host DMA Port */
|
||||
#define ANOMALY_05000337 /* Disallowed Configuration Prevents Subsequent
|
||||
Allowed Configuration on Host DMA Port */
|
||||
#define ANOMALY_05000338 /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */
|
||||
|
||||
#endif /* _MACH_ANOMALY_H_ */
|
||||
@@ -0,0 +1,271 @@
|
||||
/*
|
||||
* File: include/asm-blackfin/mach-bf548/bf548.h
|
||||
* Based on:
|
||||
* Author:
|
||||
*
|
||||
* Created:
|
||||
* Description: System MMR register and memory map for ADSP-BF548
|
||||
*
|
||||
* Modified:
|
||||
* Copyright 2004-2007 Analog Devices Inc.
|
||||
*
|
||||
* Bugs: Enter bugs at http://blackfin.uclinux.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see the file COPYING, or write
|
||||
* to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __MACH_BF548_H__
|
||||
#define __MACH_BF548_H__
|
||||
|
||||
#define SUPPORTED_REVID 0
|
||||
|
||||
#define OFFSET_(x) ((x) & 0x0000FFFF)
|
||||
|
||||
/*some misc defines*/
|
||||
#define IMASK_IVG15 0x8000
|
||||
#define IMASK_IVG14 0x4000
|
||||
#define IMASK_IVG13 0x2000
|
||||
#define IMASK_IVG12 0x1000
|
||||
|
||||
#define IMASK_IVG11 0x0800
|
||||
#define IMASK_IVG10 0x0400
|
||||
#define IMASK_IVG9 0x0200
|
||||
#define IMASK_IVG8 0x0100
|
||||
|
||||
#define IMASK_IVG7 0x0080
|
||||
#define IMASK_IVGTMR 0x0040
|
||||
#define IMASK_IVGHW 0x0020
|
||||
|
||||
/***************************/
|
||||
|
||||
|
||||
#define BLKFIN_DSUBBANKS 4
|
||||
#define BLKFIN_DWAYS 2
|
||||
#define BLKFIN_DLINES 64
|
||||
#define BLKFIN_ISUBBANKS 4
|
||||
#define BLKFIN_IWAYS 4
|
||||
#define BLKFIN_ILINES 32
|
||||
|
||||
#define WAY0_L 0x1
|
||||
#define WAY1_L 0x2
|
||||
#define WAY01_L 0x3
|
||||
#define WAY2_L 0x4
|
||||
#define WAY02_L 0x5
|
||||
#define WAY12_L 0x6
|
||||
#define WAY012_L 0x7
|
||||
|
||||
#define WAY3_L 0x8
|
||||
#define WAY03_L 0x9
|
||||
#define WAY13_L 0xA
|
||||
#define WAY013_L 0xB
|
||||
|
||||
#define WAY32_L 0xC
|
||||
#define WAY320_L 0xD
|
||||
#define WAY321_L 0xE
|
||||
#define WAYALL_L 0xF
|
||||
|
||||
#define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
|
||||
|
||||
/********************************* EBIU Settings ************************************/
|
||||
#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
|
||||
#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
|
||||
|
||||
#ifdef CONFIG_C_AMBEN_ALL
|
||||
#define V_AMBEN AMBEN_ALL
|
||||
#endif
|
||||
#ifdef CONFIG_C_AMBEN
|
||||
#define V_AMBEN 0x0
|
||||
#endif
|
||||
#ifdef CONFIG_C_AMBEN_B0
|
||||
#define V_AMBEN AMBEN_B0
|
||||
#endif
|
||||
#ifdef CONFIG_C_AMBEN_B0_B1
|
||||
#define V_AMBEN AMBEN_B0_B1
|
||||
#endif
|
||||
#ifdef CONFIG_C_AMBEN_B0_B1_B2
|
||||
#define V_AMBEN AMBEN_B0_B1_B2
|
||||
#endif
|
||||
#ifdef CONFIG_C_AMCKEN
|
||||
#define V_AMCKEN AMCKEN
|
||||
#else
|
||||
#define V_AMCKEN 0x0
|
||||
#endif
|
||||
|
||||
#define AMGCTLVAL (V_AMBEN | V_AMCKEN)
|
||||
|
||||
#define MAX_VC 650000000
|
||||
#define MIN_VC 50000000
|
||||
|
||||
/********************************PLL Settings **************************************/
|
||||
#ifdef CONFIG_BFIN_KERNEL_CLOCK
|
||||
#if (CONFIG_VCO_MULT < 0)
|
||||
#error "VCO Multiplier is less than 0. Please select a different value"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_VCO_MULT == 0)
|
||||
#error "VCO Multiplier should be greater than 0. Please select a different value"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_VCO_MULT > 64)
|
||||
#error "VCO Multiplier is more than 64. Please select a different value"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CLKIN_HALF
|
||||
#define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
|
||||
#else
|
||||
#define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_PLL_BYPASS
|
||||
#define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
|
||||
#define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
|
||||
#else
|
||||
#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
|
||||
#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
|
||||
#endif
|
||||
|
||||
#if (CONFIG_SCLK_DIV < 1)
|
||||
#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_SCLK_DIV > 15)
|
||||
#error "SCLK DIV cannot be less than 1 or more than 15. Please select a proper value"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_CCLK_DIV != 1)
|
||||
#if (CONFIG_CCLK_DIV != 2)
|
||||
#if (CONFIG_CCLK_DIV != 4)
|
||||
#if (CONFIG_CCLK_DIV != 8)
|
||||
#error "CCLK DIV can be 1,2,4 or 8 only. Please select a proper value"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (CONFIG_VCO_HZ > MAX_VC)
|
||||
#error "VCO selected is more than maximum value. Please change the VCO multipler"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_SCLK_HZ > 133000000)
|
||||
#error "Sclk value selected is more than maximum. Please select a proper value for SCLK multiplier"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_SCLK_HZ < 27000000)
|
||||
#error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ)
|
||||
#if (CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ)
|
||||
#if (CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ)
|
||||
#error "Please select sclk less than cclk"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (CONFIG_CCLK_DIV == 1)
|
||||
#define CONFIG_CCLK_ACT_DIV CCLK_DIV1
|
||||
#endif
|
||||
#if (CONFIG_CCLK_DIV == 2)
|
||||
#define CONFIG_CCLK_ACT_DIV CCLK_DIV2
|
||||
#endif
|
||||
#if (CONFIG_CCLK_DIV == 4)
|
||||
#define CONFIG_CCLK_ACT_DIV CCLK_DIV4
|
||||
#endif
|
||||
#if (CONFIG_CCLK_DIV == 8)
|
||||
#define CONFIG_CCLK_ACT_DIV CCLK_DIV8
|
||||
#endif
|
||||
#ifndef CONFIG_CCLK_ACT_DIV
|
||||
#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_BFIN_KERNEL_CLOCK */
|
||||
|
||||
#ifdef CONFIG_BF542
|
||||
#define CPU "BF542"
|
||||
#define CPUID 0x027c8000
|
||||
#endif
|
||||
#ifdef CONFIG_BF544
|
||||
#define CPU "BF544"
|
||||
#define CPUID 0x027c8000
|
||||
#endif
|
||||
#ifdef CONFIG_BF548
|
||||
#define CPU "BF548"
|
||||
#define CPUID 0x027c6000
|
||||
#endif
|
||||
#ifdef CONFIG_BF549
|
||||
#define CPU "BF549"
|
||||
#endif
|
||||
#ifndef CPU
|
||||
#define CPU "UNKNOWN"
|
||||
#define CPUID 0x0
|
||||
#endif
|
||||
|
||||
#if (CONFIG_MEM_SIZE % 4)
|
||||
#error "SDRAM mem size must be multible of 4MB"
|
||||
#endif
|
||||
|
||||
#define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO)
|
||||
#define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK)
|
||||
#define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK)
|
||||
#define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID)
|
||||
|
||||
/*Use the menuconfig cache policy here - CONFIG_BLKFIN_WT/CONFIG_BLKFIN_WB*/
|
||||
|
||||
#define ANOMALY_05000158_WORKAROUND 0x200
|
||||
#ifdef CONFIG_BLKFIN_WB /*Write Back Policy */
|
||||
#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_DIRTY \
|
||||
| CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND)
|
||||
#else /*Write Through */
|
||||
#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW \
|
||||
| CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
|
||||
#endif
|
||||
|
||||
|
||||
#define L1_DMEMORY (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
|
||||
#define SDRAM_DNON_CHBL (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
|
||||
#define SDRAM_EBIU (CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_DIRTY )
|
||||
#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY )
|
||||
|
||||
#define SIZE_1K 0x00000400 /* 1K */
|
||||
#define SIZE_4K 0x00001000 /* 4K */
|
||||
#define SIZE_1M 0x00100000 /* 1M */
|
||||
#define SIZE_4M 0x00400000 /* 4M */
|
||||
|
||||
#define MAX_CPLBS (16 * 2)
|
||||
|
||||
/*
|
||||
* Number of required data CPLB switchtable entries
|
||||
* MEMSIZE / 4 (we mostly install 4M page size CPLBs
|
||||
* approx 16 for smaller 1MB page size CPLBs for allignment purposes
|
||||
* 1 for L1 Data Memory
|
||||
* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
|
||||
* 1 for ASYNC Memory
|
||||
*/
|
||||
|
||||
|
||||
#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2)
|
||||
|
||||
/*
|
||||
* Number of required instruction CPLB switchtable entries
|
||||
* MEMSIZE / 4 (we mostly install 4M page size CPLBs
|
||||
* approx 12 for smaller 1MB page size CPLBs for allignment purposes
|
||||
* 1 for L1 Instruction Memory
|
||||
* 1 for CONFIG_DEBUG_HUNT_FOR_ZERO
|
||||
*/
|
||||
|
||||
#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2)
|
||||
|
||||
#endif /* __MACH_BF48_H__ */
|
||||
@@ -0,0 +1,193 @@
|
||||
#include <linux/serial.h>
|
||||
#include <asm/dma.h>
|
||||
|
||||
#define NR_PORTS 4
|
||||
|
||||
#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
|
||||
#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
|
||||
#define OFFSET_GCTL 0x08 /* Global Control Register */
|
||||
#define OFFSET_LCR 0x0C /* Line Control Register */
|
||||
#define OFFSET_MCR 0x10 /* Modem Control Register */
|
||||
#define OFFSET_LSR 0x14 /* Line Status Register */
|
||||
#define OFFSET_MSR 0x18 /* Modem Status Register */
|
||||
#define OFFSET_SCR 0x1C /* SCR Scratch Register */
|
||||
#define OFFSET_IER_SET 0x20 /* Set Interrupt Enable Register */
|
||||
#define OFFSET_IER_CLEAR 0x24 /* Clear Interrupt Enable Register */
|
||||
#define OFFSET_THR 0x28 /* Transmit Holding register */
|
||||
#define OFFSET_RBR 0x2C /* Receive Buffer register */
|
||||
|
||||
#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
|
||||
#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
|
||||
#define UART_GET_DLH(uart) bfin_read16(((uart)->port.membase + OFFSET_DLH))
|
||||
#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER_SET))
|
||||
#define UART_GET_LCR(uart) bfin_read16(((uart)->port.membase + OFFSET_LCR))
|
||||
#define UART_GET_LSR(uart) bfin_read16(((uart)->port.membase + OFFSET_LSR))
|
||||
#define UART_GET_GCTL(uart) bfin_read16(((uart)->port.membase + OFFSET_GCTL))
|
||||
|
||||
#define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v)
|
||||
#define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v)
|
||||
#define UART_SET_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_SET),v)
|
||||
#define UART_CLEAR_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER_CLEAR),v)
|
||||
#define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v)
|
||||
#define UART_PUT_LSR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LSR),v)
|
||||
#define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v)
|
||||
#define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v)
|
||||
|
||||
#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
|
||||
# define CONFIG_SERIAL_BFIN_CTSRTS
|
||||
|
||||
# ifndef CONFIG_UART0_CTS_PIN
|
||||
# define CONFIG_UART0_CTS_PIN -1
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_UART0_RTS_PIN
|
||||
# define CONFIG_UART0_RTS_PIN -1
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_UART1_CTS_PIN
|
||||
# define CONFIG_UART1_CTS_PIN -1
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_UART1_RTS_PIN
|
||||
# define CONFIG_UART1_RTS_PIN -1
|
||||
# endif
|
||||
#endif
|
||||
/*
|
||||
* The pin configuration is different from schematic
|
||||
*/
|
||||
struct bfin_serial_port {
|
||||
struct uart_port port;
|
||||
unsigned int old_status;
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
int tx_done;
|
||||
int tx_count;
|
||||
struct circ_buf rx_dma_buf;
|
||||
struct timer_list rx_dma_timer;
|
||||
int rx_dma_nrows;
|
||||
unsigned int tx_dma_channel;
|
||||
unsigned int rx_dma_channel;
|
||||
struct work_struct tx_dma_workqueue;
|
||||
#else
|
||||
struct work_struct cts_workqueue;
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
||||
int cts_pin;
|
||||
int rts_pin;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct bfin_serial_port bfin_serial_ports[NR_PORTS];
|
||||
struct bfin_serial_res {
|
||||
unsigned long uart_base_addr;
|
||||
int uart_irq;
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
unsigned int uart_tx_dma_channel;
|
||||
unsigned int uart_rx_dma_channel;
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
||||
int uart_cts_pin;
|
||||
int uart_rts_pin;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct bfin_serial_res bfin_serial_resource[] = {
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
{
|
||||
0xFFC00400,
|
||||
IRQ_UART0_RX,
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
CH_UART0_TX,
|
||||
CH_UART0_RX,
|
||||
#endif
|
||||
#ifdef CONFIG_BFIN_UART0_CTSRTS
|
||||
CONFIG_UART0_CTS_PIN,
|
||||
CONFIG_UART0_RTS_PIN,
|
||||
#endif
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
{
|
||||
0xFFC02000,
|
||||
IRQ_UART1_RX,
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
CH_UART1_TX,
|
||||
CH_UART1_RX,
|
||||
#endif
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
{
|
||||
0xFFC02100,
|
||||
IRQ_UART2_RX,
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
CH_UART2_TX,
|
||||
CH_UART2_RX,
|
||||
#endif
|
||||
#ifdef CONFIG_BFIN_UART2_CTSRTS
|
||||
CONFIG_UART2_CTS_PIN,
|
||||
CONFIG_UART2_RTS_PIN,
|
||||
#endif
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
{
|
||||
0xFFC03100,
|
||||
IRQ_UART3_RX,
|
||||
#ifdef CONFIG_SERIAL_BFIN_DMA
|
||||
CH_UART3_TX,
|
||||
CH_UART3_RX,
|
||||
#endif
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
int nr_ports = ARRAY_SIZE(bfin_serial_resource);
|
||||
|
||||
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
|
||||
{
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART0
|
||||
/* Enable UART0 RX and TX on pin 7 & 8 of PORT E */
|
||||
bfin_write_PORTE_FER(0x180 | bfin_read_PORTE_FER());
|
||||
bfin_write_PORTE_MUX(0x3C000 | bfin_read_PORTE_MUX());
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART1
|
||||
/* Enable UART1 RX and TX on pin 0 & 1 of PORT H */
|
||||
bfin_write_PORTH_FER(0x3 | bfin_read_PORTH_FER());
|
||||
bfin_write_PORTH_MUX(~0xF & bfin_read_PORTH_MUX());
|
||||
#ifdef CONFIG_BFIN_UART1_CTSRTS
|
||||
/* Enable UART1 RTS and CTS on pin 9 & 10 of PORT E */
|
||||
bfin_write_PORTE_FER(0x600 | bfin_read_PORTE_FER());
|
||||
bfin_write_PORTE_MUX(~0x3C0000 & bfin_read_PORTE_MUX());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART2
|
||||
/* Enable UART2 RX and TX on pin 4 & 5 of PORT B */
|
||||
bfin_write_PORTB_FER(0x30 | bfin_read_PORTB_FER());
|
||||
bfin_write_PORTB_MUX(~0xF00 & bfin_read_PORTB_MUX());
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_BFIN_UART3
|
||||
/* Enable UART3 RX and TX on pin 6 & 7 of PORT B */
|
||||
bfin_write_PORTB_FER(0xC0 | bfin_read_PORTB_FER());
|
||||
bfin_write_PORTB_MUX(~0xF000 | bfin_read_PORTB_MUX());
|
||||
#ifdef CONFIG_BFIN_UART3_CTSRTS
|
||||
/* Enable UART3 RTS and CTS on pin 2 & 3 of PORT B */
|
||||
bfin_write_PORTB_FER(0xC | bfin_read_PORTB_FER());
|
||||
bfin_write_PORTB_MUX(~0xF0 | bfin_read_PORTB_MUX());
|
||||
#endif
|
||||
#endif
|
||||
SSYNC();
|
||||
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
|
||||
if (uart->cts_pin >= 0) {
|
||||
gpio_request(uart->cts_pin, NULL);
|
||||
gpio_direction_input(uart->cts_pin);
|
||||
}
|
||||
|
||||
if (uart->rts_pin >= 0) {
|
||||
gpio_request(uart->rts_pin, NULL);
|
||||
gpio_direction_output(uart->rts_pin);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* File: include/asm-blackfin/mach-bf548/blackfin.h
|
||||
* Based on:
|
||||
* Author:
|
||||
*
|
||||
* Created:
|
||||
* Description:
|
||||
*
|
||||
* Rev:
|
||||
*
|
||||
* Modified:
|
||||
*
|
||||
*
|
||||
* Bugs: Enter bugs at http://blackfin.uclinux.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING.
|
||||
* If not, write to the Free Software Foundation,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _MACH_BLACKFIN_H_
|
||||
#define _MACH_BLACKFIN_H_
|
||||
|
||||
#define BF548_FAMILY
|
||||
|
||||
#include "bf548.h"
|
||||
#include "mem_map.h"
|
||||
#include "anomaly.h"
|
||||
|
||||
#ifdef CONFIG_BF542
|
||||
#include "defBF542.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BF544
|
||||
#include "defBF544.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BF548
|
||||
#include "defBF548.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BF549
|
||||
#include "defBF549.h"
|
||||
#endif
|
||||
|
||||
#if !(defined(__ASSEMBLY__) || defined(ASSEMBLY))
|
||||
#ifdef CONFIG_BF542
|
||||
#include "cdefBF542.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BF544
|
||||
#include "cdefBF544.h"
|
||||
#endif
|
||||
#ifdef CONFIG_BF548
|
||||
#include "cdefBF548.h"
|
||||
#endif
|
||||
#ifdef CONFIG_BF549
|
||||
#include "cdefBF549.h"
|
||||
#endif
|
||||
|
||||
/* UART 1*/
|
||||
#define bfin_read_UART_THR() bfin_read_UART1_THR()
|
||||
#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
|
||||
#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
|
||||
#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
|
||||
#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
|
||||
#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
|
||||
#define bfin_read_UART_IER() bfin_read_UART1_IER()
|
||||
#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
|
||||
#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
|
||||
#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
|
||||
#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
|
||||
#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
|
||||
#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
|
||||
#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
|
||||
#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
|
||||
#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
|
||||
#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
|
||||
#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
|
||||
#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
|
||||
#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
|
||||
#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
|
||||
#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
|
||||
|
||||
#endif
|
||||
|
||||
/* MAP used DEFINES from BF533 to BF54x - so we don't need to change
|
||||
* them in the driver, kernel, etc. */
|
||||
|
||||
/* UART_IIR Register */
|
||||
#define STATUS(x) ((x << 1) & 0x06)
|
||||
#define STATUS_P1 0x02
|
||||
#define STATUS_P0 0x01
|
||||
|
||||
/* UART 0*/
|
||||
|
||||
/* DMA Channnel */
|
||||
#define bfin_read_CH_UART_RX() bfin_read_CH_UART1_RX()
|
||||
#define bfin_write_CH_UART_RX(val) bfin_write_CH_UART1_RX(val)
|
||||
#define bfin_read_CH_UART_TX() bfin_read_CH_UART1_TX()
|
||||
#define bfin_write_CH_UART_TX(val) bfin_write_CH_UART1_TX(val)
|
||||
#define CH_UART_RX CH_UART1_RX
|
||||
#define CH_UART_TX CH_UART1_TX
|
||||
|
||||
/* System Interrupt Controller */
|
||||
#define bfin_read_IRQ_UART_RX() bfin_read_IRQ_UART1_RX()
|
||||
#define bfin_write_IRQ_UART_RX(val) bfin_write_IRQ_UART1_RX(val)
|
||||
#define bfin_read_IRQ_UART_TX() bfin_read_IRQ_UART1_TX()
|
||||
#define bfin_write_IRQ_UART_TX(val) bfin_write_IRQ_UART1_TX(val)
|
||||
#define bfin_read_IRQ_UART_ERROR() bfin_read_IRQ_UART1_ERROR()
|
||||
#define bfin_write_IRQ_UART_ERROR(val) bfin_write_IRQ_UART1_ERROR(val)
|
||||
#define IRQ_UART_RX IRQ_UART1_RX
|
||||
#define IRQ_UART_TX IRQ_UART1_TX
|
||||
#define IRQ_UART_ERROR IRQ_UART1_ERROR
|
||||
|
||||
/* MMR Registers*/
|
||||
#define bfin_read_UART_THR() bfin_read_UART1_THR()
|
||||
#define bfin_write_UART_THR(val) bfin_write_UART1_THR(val)
|
||||
#define bfin_read_UART_RBR() bfin_read_UART1_RBR()
|
||||
#define bfin_write_UART_RBR(val) bfin_write_UART1_RBR(val)
|
||||
#define bfin_read_UART_DLL() bfin_read_UART1_DLL()
|
||||
#define bfin_write_UART_DLL(val) bfin_write_UART1_DLL(val)
|
||||
#define bfin_read_UART_IER() bfin_read_UART1_IER()
|
||||
#define bfin_write_UART_IER(val) bfin_write_UART1_IER(val)
|
||||
#define bfin_read_UART_DLH() bfin_read_UART1_DLH()
|
||||
#define bfin_write_UART_DLH(val) bfin_write_UART1_DLH(val)
|
||||
#define bfin_read_UART_IIR() bfin_read_UART1_IIR()
|
||||
#define bfin_write_UART_IIR(val) bfin_write_UART1_IIR(val)
|
||||
#define bfin_read_UART_LCR() bfin_read_UART1_LCR()
|
||||
#define bfin_write_UART_LCR(val) bfin_write_UART1_LCR(val)
|
||||
#define bfin_read_UART_MCR() bfin_read_UART1_MCR()
|
||||
#define bfin_write_UART_MCR(val) bfin_write_UART1_MCR(val)
|
||||
#define bfin_read_UART_LSR() bfin_read_UART1_LSR()
|
||||
#define bfin_write_UART_LSR(val) bfin_write_UART1_LSR(val)
|
||||
#define bfin_read_UART_SCR() bfin_read_UART1_SCR()
|
||||
#define bfin_write_UART_SCR(val) bfin_write_UART1_SCR(val)
|
||||
#define bfin_read_UART_GCTL() bfin_read_UART1_GCTL()
|
||||
#define bfin_write_UART_GCTL(val) bfin_write_UART1_GCTL(val)
|
||||
#define UART_THR UART1_THR
|
||||
#define UART_RBR UART1_RBR
|
||||
#define UART_DLL UART1_DLL
|
||||
#define UART_IER UART1_IER
|
||||
#define UART_DLH UART1_DLH
|
||||
#define UART_IIR UART1_IIR
|
||||
#define UART_LCR UART1_LCR
|
||||
#define UART_MCR UART1_MCR
|
||||
#define UART_LSR UART1_LSR
|
||||
#define UART_SCR UART1_SCR
|
||||
#define UART_GCTL UART1_GCTL
|
||||
|
||||
/* PLL_DIV Masks */
|
||||
#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
|
||||
#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
|
||||
#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
|
||||
#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
|
||||
|
||||
#endif
|
||||
@@ -31,7 +31,8 @@
|
||||
#ifndef _CDEF_BF54X_H
|
||||
#define _CDEF_BF54X_H
|
||||
|
||||
#include <defBF54x_base.h>
|
||||
#include "defBF54x_base.h"
|
||||
#include <asm/system.h>
|
||||
|
||||
/* ************************************************************** */
|
||||
/* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */
|
||||
@@ -44,7 +45,30 @@
|
||||
#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
|
||||
#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val)
|
||||
#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
|
||||
#define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val)
|
||||
/* Writing to VR_CTL initiates a PLL relock sequence. */
|
||||
static __inline__ void bfin_write_VR_CTL(unsigned int val)
|
||||
{
|
||||
unsigned long flags, iwr0, iwr1, iwr2;
|
||||
|
||||
/* Enable the PLL Wakeup bit in SIC IWR */
|
||||
iwr0 = bfin_read32(SIC_IWR0);
|
||||
iwr1 = bfin_read32(SIC_IWR1);
|
||||
iwr2 = bfin_read32(SIC_IWR2);
|
||||
/* Only allow PPL Wakeup) */
|
||||
bfin_write32(SIC_IWR0, IWR_ENABLE(0));
|
||||
bfin_write32(SIC_IWR1, 0);
|
||||
bfin_write32(SIC_IWR2, 0);
|
||||
|
||||
bfin_write16(VR_CTL, val);
|
||||
__builtin_bfin_ssync();
|
||||
|
||||
local_irq_save(flags);
|
||||
asm("IDLE;");
|
||||
local_irq_restore(flags);
|
||||
bfin_write32(SIC_IWR0, iwr0);
|
||||
bfin_write32(SIC_IWR1, iwr1);
|
||||
bfin_write32(SIC_IWR2, iwr2);
|
||||
}
|
||||
#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
|
||||
#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val)
|
||||
#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
|
||||
@@ -70,12 +94,18 @@
|
||||
#define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1, val)
|
||||
#define bfin_read_SIC_IMASK2() bfin_read32(SIC_IMASK2)
|
||||
#define bfin_write_SIC_IMASK2(val) bfin_write32(SIC_IMASK2, val)
|
||||
#define bfin_read_SIC_IMASK(x) bfin_read32(SIC_IMASK0 + (x << 2))
|
||||
#define bfin_write_SIC_IMASK(x, val) bfin_write32((SIC_IMASK0 + (x << 2)), val)
|
||||
|
||||
#define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0)
|
||||
#define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0, val)
|
||||
#define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1)
|
||||
#define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1, val)
|
||||
#define bfin_read_SIC_ISR2() bfin_read32(SIC_ISR2)
|
||||
#define bfin_write_SIC_ISR2(val) bfin_write32(SIC_ISR2, val)
|
||||
#define bfin_read_SIC_ISR(x) bfin_read32(SIC_ISR0 + (x << 2))
|
||||
#define bfin_write_SIC_ISR(x, val) bfin_write32((SIC_ISR0 + (x << 2)), val)
|
||||
|
||||
#define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0)
|
||||
#define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0, val)
|
||||
#define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1)
|
||||
@@ -710,21 +740,21 @@
|
||||
#define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR)
|
||||
#define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
|
||||
#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR)
|
||||
#define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR, val)
|
||||
#define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
|
||||
#define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG, val)
|
||||
#define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
|
||||
#define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT, val)
|
||||
#define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
|
||||
#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY)
|
||||
#define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY, val)
|
||||
#define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
|
||||
#define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT, val)
|
||||
#define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
|
||||
#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY)
|
||||
#define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY, val)
|
||||
#define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
|
||||
#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR)
|
||||
#define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR, val)
|
||||
#define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
|
||||
#define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS, val)
|
||||
#define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
|
||||
@@ -734,23 +764,23 @@
|
||||
#define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
|
||||
#define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT, val)
|
||||
#define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
|
||||
#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR)
|
||||
#define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR, val)
|
||||
#define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
|
||||
#define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG, val)
|
||||
#define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
|
||||
#define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT, val)
|
||||
#define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
|
||||
#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY)
|
||||
#define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY, val)
|
||||
#define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
|
||||
#define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT, val)
|
||||
#define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
|
||||
#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY)
|
||||
#define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY, val)
|
||||
#define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
|
||||
#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR)
|
||||
#define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR, val)
|
||||
#define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
|
||||
#define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS, val)
|
||||
#define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
|
||||
@@ -763,9 +793,9 @@
|
||||
/* MDMA Stream 1 Registers */
|
||||
|
||||
#define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
|
||||
#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR)
|
||||
#define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR, val)
|
||||
#define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
|
||||
#define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG, val)
|
||||
#define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
|
||||
@@ -777,9 +807,9 @@
|
||||
#define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
|
||||
#define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY)
|
||||
#define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
|
||||
#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR)
|
||||
#define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR, val)
|
||||
#define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
|
||||
#define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS, val)
|
||||
#define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
|
||||
@@ -789,9 +819,9 @@
|
||||
#define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
|
||||
#define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT, val)
|
||||
#define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR)
|
||||
#define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
|
||||
#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR)
|
||||
#define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR, val)
|
||||
#define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
|
||||
#define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG, val)
|
||||
#define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
|
||||
@@ -803,9 +833,9 @@
|
||||
#define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
|
||||
#define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY)
|
||||
#define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR)
|
||||
#define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR, val)
|
||||
#define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
|
||||
#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR)
|
||||
#define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR, val)
|
||||
#define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
|
||||
#define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS, val)
|
||||
#define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -538,21 +538,13 @@
|
||||
/* Bit masks for PIXC_CTL */
|
||||
|
||||
#define PIXC_EN 0x1 /* Pixel Compositor Enable */
|
||||
#define nPIXC_EN 0x0
|
||||
#define OVR_A_EN 0x2 /* Overlay A Enable */
|
||||
#define nOVR_A_EN 0x0
|
||||
#define OVR_B_EN 0x4 /* Overlay B Enable */
|
||||
#define nOVR_B_EN 0x0
|
||||
#define IMG_FORM 0x8 /* Image Data Format */
|
||||
#define nIMG_FORM 0x0
|
||||
#define OVR_FORM 0x10 /* Overlay Data Format */
|
||||
#define nOVR_FORM 0x0
|
||||
#define OUT_FORM 0x20 /* Output Data Format */
|
||||
#define nOUT_FORM 0x0
|
||||
#define UDS_MOD 0x40 /* Resampling Mode */
|
||||
#define nUDS_MOD 0x0
|
||||
#define TC_EN 0x80 /* Transparent Color Enable */
|
||||
#define nTC_EN 0x0
|
||||
#define IMG_STAT 0x300 /* Image FIFO Status */
|
||||
#define OVR_STAT 0xc00 /* Overlay FIFO Status */
|
||||
#define WM_LVL 0x3000 /* FIFO Watermark Level */
|
||||
@@ -600,13 +592,9 @@
|
||||
/* Bit masks for PIXC_INTRSTAT */
|
||||
|
||||
#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
|
||||
#define nOVR_INT_EN 0x0
|
||||
#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
|
||||
#define nFRM_INT_EN 0x0
|
||||
#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
|
||||
#define nOVR_INT_STAT 0x0
|
||||
#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
|
||||
#define nFRM_INT_STAT 0x0
|
||||
|
||||
/* Bit masks for PIXC_RYCON */
|
||||
|
||||
@@ -614,7 +602,6 @@
|
||||
#define A12 0xffc00 /* A12 in the Coefficient Matrix */
|
||||
#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
|
||||
#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
|
||||
#define nRY_MULT4 0x0
|
||||
|
||||
/* Bit masks for PIXC_GUCON */
|
||||
|
||||
@@ -622,7 +609,6 @@
|
||||
#define A22 0xffc00 /* A22 in the Coefficient Matrix */
|
||||
#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
|
||||
#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
|
||||
#define nGU_MULT4 0x0
|
||||
|
||||
/* Bit masks for PIXC_BVCON */
|
||||
|
||||
@@ -630,7 +616,6 @@
|
||||
#define A32 0xffc00 /* A32 in the Coefficient Matrix */
|
||||
#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
|
||||
#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
|
||||
#define nBV_MULT4 0x0
|
||||
|
||||
/* Bit masks for PIXC_CCBIAS */
|
||||
|
||||
@@ -647,48 +632,28 @@
|
||||
/* Bit masks for HOST_CONTROL */
|
||||
|
||||
#define HOST_EN 0x1 /* Host Enable */
|
||||
#define nHOST_EN 0x0
|
||||
#define HOST_END 0x2 /* Host Endianess */
|
||||
#define nHOST_END 0x0
|
||||
#define DATA_SIZE 0x4 /* Data Size */
|
||||
#define nDATA_SIZE 0x0
|
||||
#define HOST_RST 0x8 /* Host Reset */
|
||||
#define nHOST_RST 0x0
|
||||
#define HRDY_OVR 0x20 /* Host Ready Override */
|
||||
#define nHRDY_OVR 0x0
|
||||
#define INT_MODE 0x40 /* Interrupt Mode */
|
||||
#define nINT_MODE 0x0
|
||||
#define BT_EN 0x80 /* Bus Timeout Enable */
|
||||
#define nBT_EN 0x0
|
||||
#define EHW 0x100 /* Enable Host Write */
|
||||
#define nEHW 0x0
|
||||
#define EHR 0x200 /* Enable Host Read */
|
||||
#define nEHR 0x0
|
||||
#define BDR 0x400 /* Burst DMA Requests */
|
||||
#define nBDR 0x0
|
||||
|
||||
/* Bit masks for HOST_STATUS */
|
||||
|
||||
#define READY 0x1 /* DMA Ready */
|
||||
#define nREADY 0x0
|
||||
#define FIFOFULL 0x2 /* FIFO Full */
|
||||
#define nFIFOFULL 0x0
|
||||
#define FIFOEMPTY 0x4 /* FIFO Empty */
|
||||
#define nFIFOEMPTY 0x0
|
||||
#define COMPLETE 0x8 /* DMA Complete */
|
||||
#define nCOMPLETE 0x0
|
||||
#define HSHK 0x10 /* Host Handshake */
|
||||
#define nHSHK 0x0
|
||||
#define TIMEOUT 0x20 /* Host Timeout */
|
||||
#define nTIMEOUT 0x0
|
||||
#define HIRQ 0x40 /* Host Interrupt Request */
|
||||
#define nHIRQ 0x0
|
||||
#define ALLOW_CNFG 0x80 /* Allow New Configuration */
|
||||
#define nALLOW_CNFG 0x0
|
||||
#define DMA_DIR 0x100 /* DMA Direction */
|
||||
#define nDMA_DIR 0x0
|
||||
#define BTE 0x200 /* Bus Timeout Enabled */
|
||||
#define nBTE 0x0
|
||||
|
||||
/* Bit masks for HOST_TIMEOUT */
|
||||
|
||||
@@ -697,67 +662,42 @@
|
||||
/* Bit masks for TIMER_ENABLE1 */
|
||||
|
||||
#define TIMEN8 0x1 /* Timer 8 Enable */
|
||||
#define nTIMEN8 0x0
|
||||
#define TIMEN9 0x2 /* Timer 9 Enable */
|
||||
#define nTIMEN9 0x0
|
||||
#define TIMEN10 0x4 /* Timer 10 Enable */
|
||||
#define nTIMEN10 0x0
|
||||
|
||||
/* Bit masks for TIMER_DISABLE1 */
|
||||
|
||||
#define TIMDIS8 0x1 /* Timer 8 Disable */
|
||||
#define nTIMDIS8 0x0
|
||||
#define TIMDIS9 0x2 /* Timer 9 Disable */
|
||||
#define nTIMDIS9 0x0
|
||||
#define TIMDIS10 0x4 /* Timer 10 Disable */
|
||||
#define nTIMDIS10 0x0
|
||||
|
||||
/* Bit masks for TIMER_STATUS1 */
|
||||
|
||||
#define TIMIL8 0x1 /* Timer 8 Interrupt */
|
||||
#define nTIMIL8 0x0
|
||||
#define TIMIL9 0x2 /* Timer 9 Interrupt */
|
||||
#define nTIMIL9 0x0
|
||||
#define TIMIL10 0x4 /* Timer 10 Interrupt */
|
||||
#define nTIMIL10 0x0
|
||||
#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
|
||||
#define nTOVF_ERR8 0x0
|
||||
#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
|
||||
#define nTOVF_ERR9 0x0
|
||||
#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
|
||||
#define nTOVF_ERR10 0x0
|
||||
#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
|
||||
#define nTRUN8 0x0
|
||||
#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
|
||||
#define nTRUN9 0x0
|
||||
#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
|
||||
#define nTRUN10 0x0
|
||||
|
||||
/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
|
||||
|
||||
/* Bit masks for HMDMAx_CONTROL */
|
||||
|
||||
#define HMDMAEN 0x1 /* Handshake MDMA Enable */
|
||||
#define nHMDMAEN 0x0
|
||||
#define REP 0x2 /* Handshake MDMA Request Polarity */
|
||||
#define nREP 0x0
|
||||
#define UTE 0x8 /* Urgency Threshold Enable */
|
||||
#define nUTE 0x0
|
||||
#define OIE 0x10 /* Overflow Interrupt Enable */
|
||||
#define nOIE 0x0
|
||||
#define BDIE 0x20 /* Block Done Interrupt Enable */
|
||||
#define nBDIE 0x0
|
||||
#define MBDI 0x40 /* Mask Block Done Interrupt */
|
||||
#define nMBDI 0x0
|
||||
#define DRQ 0x300 /* Handshake MDMA Request Type */
|
||||
#define RBC 0x1000 /* Force Reload of BCOUNT */
|
||||
#define nRBC 0x0
|
||||
#define PS 0x2000 /* Pin Status */
|
||||
#define nPS 0x0
|
||||
#define OI 0x4000 /* Overflow Interrupt Generated */
|
||||
#define nOI 0x0
|
||||
#define BDI 0x8000 /* Block Done Interrupt Generated */
|
||||
#define nBDI 0x0
|
||||
|
||||
/* ******************************************* */
|
||||
/* MULTI BIT MACRO ENUMERATIONS */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user