summaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/config-3.10
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-04 23:46:44 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-04 23:46:44 +0000
commite0027ed4abef834297a54d95309688bc22f4d77c (patch)
tree306b24465b16974874c749c2d12097d588c7ff73 /target/linux/bcm53xx/config-3.10
parent2bc9700c0d43b8fb0e4e3a6738e2ff8340ce78a1 (diff)
downloadmaster-31e0f0ae-e0027ed4abef834297a54d95309688bc22f4d77c.tar.gz
master-31e0f0ae-e0027ed4abef834297a54d95309688bc22f4d77c.tar.bz2
master-31e0f0ae-e0027ed4abef834297a54d95309688bc22f4d77c.zip
bcm53xx: make the l2x0 L2 cache controller work
This fixes the DMA problems with the Ethernet driver. This also updates some other parts of the patches. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 39203
Diffstat (limited to 'target/linux/bcm53xx/config-3.10')
-rw-r--r--target/linux/bcm53xx/config-3.1013
1 files changed, 10 insertions, 3 deletions
diff --git a/target/linux/bcm53xx/config-3.10 b/target/linux/bcm53xx/config-3.10
index 1e12a9424e..8fea646217 100644
--- a/target/linux/bcm53xx/config-3.10
+++ b/target/linux/bcm53xx/config-3.10
@@ -1,6 +1,6 @@
CONFIG_ALIGNMENT_TRAP=y
# CONFIG_ARCH_BCM is not set
-CONFIG_ARCH_BCM53XX=y
+CONFIG_ARCH_BCM_5301X=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_ARCH_HAS_TICK_BROADCAST=y
@@ -48,7 +48,8 @@ CONFIG_BCMA_HOST_PCI=y
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
CONFIG_BCMA_HOST_SOC=y
CONFIG_BGMAC=y
-# CONFIG_CACHE_L2X0 is not set
+CONFIG_CACHE_L2X0=y
+CONFIG_CACHE_PL310=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
@@ -71,7 +72,7 @@ CONFIG_CPU_RMAP=y
CONFIG_CPU_TLB_V7=y
CONFIG_CPU_V7=y
CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_BCM53XX=y
+CONFIG_DEBUG_BCM_5301X=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_LL_INCLUDE="debug/bcm53xx.S"
@@ -165,11 +166,17 @@ CONFIG_OF_PCI=y
CONFIG_OF_PCI_IRQ=y
CONFIG_OLD_SIGACTION=y
CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_PCI=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PHYLIB=y
+# CONFIG_PL310_ERRATA_588369 is not set
+# CONFIG_PL310_ERRATA_727915 is not set
+# CONFIG_PL310_ERRATA_753970 is not set
+# CONFIG_PL310_ERRATA_769419 is not set
# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_STALL_COMMON=y
CONFIG_RFS_ACCEL=y
000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 *   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, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 *
 *   Copyright (C) 2005 infineon
 *   Copyright (C) 2007 John Crispin <blogic@openwrt.org> 
 *
 */
#ifndef _DANUBE_DMA_H__
#define _DANUBE_DMA_H__

#define RCV_INT							1
#define TX_BUF_FULL_INT					2
#define TRANSMIT_CPT_INT				4
#define DANUBE_DMA_CH_ON				1
#define DANUBE_DMA_CH_OFF				0
#define DANUBE_DMA_CH_DEFAULT_WEIGHT	100

enum attr_t{
	TX = 0,
	RX = 1,
	RESERVED = 2,
	DEFAULT = 3,
};

#define DMA_OWN							1
#define CPU_OWN							0
#define DMA_MAJOR						250

#define DMA_DESC_OWN_CPU				0x0
#define DMA_DESC_OWN_DMA				0x80000000
#define DMA_DESC_CPT_SET				0x40000000
#define DMA_DESC_SOP_SET				0x20000000
#define DMA_DESC_EOP_SET				0x10000000

#define MISCFG_MASK						0x40
#define RDERR_MASK						0x20
#define CHOFF_MASK						0x10
#define DESCPT_MASK						0x8
#define DUR_MASK						0x4
#define EOP_MASK						0x2

#define DMA_DROP_MASK					(1<<31)

#define DANUBE_DMA_RX					-1
#define DANUBE_DMA_TX					1

typedef struct dma_chan_map {
	char dev_name[15];
	enum attr_t dir;
	int pri;
	int irq;
	int rel_chan_no;
} _dma_chan_map;

#ifdef CONFIG_CPU_LITTLE_ENDIAN
typedef struct rx_desc{
	u32 data_length:16;
	volatile u32 reserved:7;
	volatile u32 byte_offset:2;
	volatile u32 Burst_length_offset:3;
	volatile u32 EoP:1;
	volatile u32 Res:1;
	volatile u32 C:1;
	volatile u32 OWN:1;
	volatile u32 Data_Pointer;
	/*fix me:should be 28 bits here, 32 bits just for host simulatiuon purpose*/
}_rx_desc;

typedef struct tx_desc{
	volatile u32 data_length:16;
	volatile u32 reserved1:7;
	volatile u32 byte_offset:5;
	volatile u32 EoP:1;
	volatile u32 SoP:1;
	volatile u32 C:1;
	volatile u32 OWN:1;
	volatile u32 Data_Pointer;//fix me:should be 28 bits here
}_tx_desc;
#else //BIG
typedef struct rx_desc{
	union
	{
		struct
		{
			volatile u32 OWN:1;
			volatile u32 C:1;
			volatile u32 SoP:1;
			volatile u32 EoP:1;
			volatile u32 Burst_length_offset:3;
			volatile u32 byte_offset:2;
			volatile u32 reserve:7;
			volatile u32 data_length:16;
		}field;
		volatile u32 word;
	}status;
	volatile u32 Data_Pointer;
}_rx_desc;

typedef struct tx_desc{
	union
	{
		struct
		{
			volatile u32 OWN:1;
			volatile u32 C:1;
			volatile u32 SoP:1;
			volatile u32 EoP:1;
			volatile u32 byte_offset:5;
			volatile u32 reserved:7;
			volatile u32 data_length:16;
		}field;
		volatile u32 word;
	}status;
	volatile u32 Data_Pointer;
}_tx_desc;
#endif //ENDIAN

typedef struct dma_channel_info{
   /*relative channel number*/
   int rel_chan_no;
   /*class for this channel for QoS*/
   int pri;
   /*specify byte_offset*/
   int byte_offset;
   /*direction*/
   int dir;
   /*irq number*/
   int irq;
   /*descriptor parameter*/
   int desc_base;
   int desc_len;
   int curr_desc;
   int prev_desc;/*only used if it is a tx channel*/
   /*weight setting for WFQ algorithm*/
   int weight;
   int default_weight;
   int packet_size;
   int burst_len;
   /*on or off of this channel*/
   int control;
   /**optional information for the upper layer devices*/
#if defined(CONFIG_DANUBE_ETHERNET_D2) || defined(CONFIG_DANUBE_PPA)
   void* opt[64];
#else
   void* opt[25];
#endif
   /*Pointer to the peripheral device who is using this channel*/
   void* dma_dev;
   /*channel operations*/
   void (*open)(struct dma_channel_info* pCh);
   void (*close)(struct dma_channel_info* pCh);
   void (*reset)(struct dma_channel_info* pCh);
   void (*enable_irq)(struct dma_channel_info* pCh);
   void (*disable_irq)(struct dma_channel_info* pCh);
}_dma_channel_info;

typedef struct dma_device_info{
    /*device name of this peripheral*/
    char device_name[15];
    int reserved;
    int tx_burst_len;
    int rx_burst_len;
    int default_weight;
    int  current_tx_chan;
	int  current_rx_chan;
    int  num_tx_chan;
    int  num_rx_chan;
    int  max_rx_chan_num;
    int  max_tx_chan_num;
    _dma_channel_info* tx_chan[20];
    _dma_channel_info* rx_chan[20];
    /*functions, optional*/
    u8* (*buffer_alloc)(int len,int* offset, void** opt);
    void (*buffer_free)(u8* dataptr, void* opt);
    int (*intr_handler)(struct dma_device_info* info, int status);
    void * priv;		/* used by peripheral driver only */
}_dma_device_info;

_dma_device_info* dma_device_reserve(char* dev_name);

void dma_device_release(_dma_device_info* dev);

void dma_device_register(_dma_device_info* info);

void dma_device_unregister(_dma_device_info* info);

int dma_device_read(struct dma_device_info* info, u8** dataptr, void** opt);

int dma_device_write(struct dma_device_info* info, u8* dataptr, int len, void* opt);
#endif