} \
} while (0)
-static void aemif_configure(int cs, struct aemif_config *cfg)
+static void aemif_cs_configure(int cs, struct aemif_config *cfg)
{
unsigned long tmp;
- if (cfg->mode == AEMIF_MODE_NAND) {
- tmp = __raw_readl(cfg->base + AEMIF_NAND_CONTROL);
- tmp |= (1 << cs);
- __raw_writel(tmp, cfg->base + AEMIF_NAND_CONTROL);
-
- } else if (cfg->mode == AEMIF_MODE_ONENAND) {
- tmp = __raw_readl(cfg->base + AEMIF_ONENAND_CONTROL);
- tmp |= (1 << cs);
- __raw_writel(tmp, cfg->base + AEMIF_ONENAND_CONTROL);
- }
-
tmp = __raw_readl(cfg->base + AEMIF_CONFIG(cs));
set_config_field(tmp, SELECT_STROBE, cfg->select_strobe);
__raw_writel(tmp, cfg->base + AEMIF_CONFIG(cs));
}
+static void aemif_configure(int cs, struct aemif_config *cfg)
+{
+ unsigned long tmp;
+
+ if (cfg->mode == AEMIF_MODE_NAND) {
+ tmp = __raw_readl(cfg->base + AEMIF_NAND_CONTROL);
+ tmp |= (1 << cs);
+ __raw_writel(tmp, cfg->base + AEMIF_NAND_CONTROL);
+
+ } else if (cfg->mode == AEMIF_MODE_ONENAND) {
+ tmp = __raw_readl(cfg->base + AEMIF_ONENAND_CONTROL);
+ tmp |= (1 << cs);
+ __raw_writel(tmp, cfg->base + AEMIF_ONENAND_CONTROL);
+ }
+
+ aemif_cs_configure(cs, cfg);
+}
+
void aemif_init(int num_cs, struct aemif_config *config)
{
int cs;