imx6q-c板子想使用EIM接口,配置完,没反应 急急急!!!!!!!!
使用imx6q-c板子 现在想使用EIM接口传输数据 但是EIM接口配置完一直没有反应啊 我是将引脚配置放到arch/arm/mach-mx6/board-mx6q_sabresd.h中配置寄存器函数放到了arch/arm/mach-mx6/board-mx6q_sabresd.c里,有问题吗?static void mx6q_setup_weimcs(void)
{
void __iomem *nor_reg = MX6_IO_ADDRESS(WEIM_BASE_ADDR);
void __iomem *ccm_reg = MX6_IO_ADDRESS(CCM_BASE_ADDR);
unsigned int reg;
struct clk *clk;
u32 rate;
/* CLKCTL_CCGR6: Set emi_slow_clock to be on in all modes */
reg = readl(ccm_reg + 0x80);
reg |= 0x00000C00;
writel(reg, ccm_reg + 0x80);
/* Timing settings below based upon datasheet for M29W256GL7AN6E
These setting assume that the EIM_SLOW_CLOCK is set to 132 MHz */
clk = clk_get(NULL, "emi_slow_clk");
if (IS_ERR(clk))
printk(KERN_ERR "emi_slow_clk not found\n");
rate = clk_get_rate(clk);
if (rate != 132000000)
printk(KERN_ERR "Warning: emi_slow_clk not set to 132 MHz!"
" WEIM NOR timing may be incorrect!\n");
/*
* For EIM General Configuration registers.
*
* CS0GCR1:
* GBC = 0; CSREC = 1; DSZ = 2; BL = 0;
* CREP = 1; CSEN = 1;
*
* EIM Operation Mode: MUM = SRD = SWR = 0.
* (Async write/Async page read, none multiplexed)
*
* CS0GCR2:
* ADH = 1
*/
writel(0x00120081, nor_reg);
writel(0x00000001, nor_reg + 0x00000004);
/*
* For EIM Read Configuration registers.
*
* CS0RCR1:
* RWSC = 1C;
* RADVA = 0; RADVN = 2;
* OEA = 2; OEN = 0;
* RCSA = 0; RCSN = 0
*
* CS0RCR2:
* APR = 1 (Async Page Read);
* PAT = 4 (6 EIM clock sycles)
*/
writel(0x1C022000, nor_reg + 0x00000008);
writel(0x0000C000, nor_reg + 0x0000000C);
/*
* For EIM Write Configuration registers.
*
* CS0WCR1:
* WWSC = 20;
* WADVA = 0; WADVN = 1;
* WBEA = 1; WBEN = 2;
* WEA = 1; WEN = 6;
* WCSA = 1; WCSN = 2;
*
* CS0WCR2:
* WBCDD = 0
*/
writel(0x1404a38e, nor_reg + 0x00000010);
writel(0x00000000, nor_reg + 0x00000014);
}
配置放置没问题,建议你看一下CPU手册,eim总线相关章节,看一下配置,如果你参考是飞凌提供的例程的话 应该是没问题的。如果还有相关问题,联系负责你的销售人员。 米哥V587 发表于 2018-2-9 17:18
配置放置没问题,建议你看一下CPU手册,eim总线相关章节,看一下配置,如果你参考是飞凌提供的例程的话 应 ...
飞凌提供的例子在哪?能发一份吗? 你好,这个问题解决了吗 XIAOAI 发表于 2018-2-10 09:01
飞凌提供的例子在哪?能发一份吗?
你好,请问这个问题解决了吗? lingyi_cai 发表于 2018-4-27 15:57
你好,这个问题解决了吗
你好,请问这个问题解决了吗?
页:
[1]