Lines Matching +full:cs +full:- +full:setup
24 static int is_valid_cs(unsigned int cs) in is_valid_cs() argument
26 if (cs > 6) in is_valid_cs()
35 int bcm63xx_set_cs_base(unsigned int cs, u32 base, unsigned int size) in bcm63xx_set_cs_base() argument
40 if (!is_valid_cs(cs)) in bcm63xx_set_cs_base()
41 return -EINVAL; in bcm63xx_set_cs_base()
45 return -EINVAL; in bcm63xx_set_cs_base()
48 return -EINVAL; in bcm63xx_set_cs_base()
51 /* 8k => 0 - 256M => 15 */ in bcm63xx_set_cs_base()
52 val |= (ilog2(size) - ilog2(8 * 1024)) << MPI_CSBASE_SIZE_SHIFT; in bcm63xx_set_cs_base()
55 bcm_mpi_writel(val, MPI_CSBASE_REG(cs)); in bcm63xx_set_cs_base()
66 int bcm63xx_set_cs_timing(unsigned int cs, unsigned int wait, in bcm63xx_set_cs_timing() argument
67 unsigned int setup, unsigned int hold) in bcm63xx_set_cs_timing() argument
72 if (!is_valid_cs(cs)) in bcm63xx_set_cs_timing()
73 return -EINVAL; in bcm63xx_set_cs_timing()
76 val = bcm_mpi_readl(MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_timing()
81 val |= setup << MPI_CSCTL_SETUP_SHIFT; in bcm63xx_set_cs_timing()
83 bcm_mpi_writel(val, MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_timing()
94 int bcm63xx_set_cs_param(unsigned int cs, u32 params) in bcm63xx_set_cs_param() argument
99 if (!is_valid_cs(cs)) in bcm63xx_set_cs_param()
100 return -EINVAL; in bcm63xx_set_cs_param()
103 if (cs == MPI_CS_PCMCIA_COMMON || in bcm63xx_set_cs_param()
104 cs == MPI_CS_PCMCIA_ATTR || in bcm63xx_set_cs_param()
105 cs == MPI_CS_PCMCIA_IO) in bcm63xx_set_cs_param()
106 return -EINVAL; in bcm63xx_set_cs_param()
109 val = bcm_mpi_readl(MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_param()
115 bcm_mpi_writel(val, MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_param()
124 * set cs status (enable/disable)
126 int bcm63xx_set_cs_status(unsigned int cs, int enable) in bcm63xx_set_cs_status() argument
131 if (!is_valid_cs(cs)) in bcm63xx_set_cs_status()
132 return -EINVAL; in bcm63xx_set_cs_status()
135 val = bcm_mpi_readl(MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_status()
140 bcm_mpi_writel(val, MPI_CSCTL_REG(cs)); in bcm63xx_set_cs_status()