/****************************************************************************/
/****************************************************************************/
-static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
+static const struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
{
const struct ddb_info *info;
static void ddb_dma_init(struct ddb_io *io, int nr, int out)
{
struct ddb_dma *dma;
- struct ddb_regmap *rm = io_regmap(io, 0);
+ const struct ddb_regmap *rm = io_regmap(io, 0);
dma = out ? &io->port->dev->odma[nr] : &io->port->dev->idma[nr];
io->dma = dma;
{
struct ddb *dev = port->dev;
struct ddb_input *input = &dev->input[anr];
- struct ddb_regmap *rm;
+ const struct ddb_regmap *rm;
port->input[pnr] = input;
input->nr = nr;
port->lnr, nr, input->regs);
if (dev->has_dma) {
- struct ddb_regmap *rm0 = io_regmap(input, 0);
+ const struct ddb_regmap *rm0 = io_regmap(input, 0);
u32 base = rm0->irq_base_idma;
u32 dma_nr = nr;
{
struct ddb *dev = port->dev;
struct ddb_output *output = &dev->output[nr];
- struct ddb_regmap *rm;
+ const struct ddb_regmap *rm;
port->output = output;
output->nr = nr;
port->lnr, nr, output->regs);
if (dev->has_dma) {
- struct ddb_regmap *rm0 = io_regmap(output, 0);
+ const struct ddb_regmap *rm0 = io_regmap(output, 0);
u32 base = rm0->irq_base_odma;
dev->handler[0][nr + base] = output_handler;
u32 i, l, p;
struct ddb_port *port;
const struct ddb_info *info;
- struct ddb_regmap *rm;
+ const struct ddb_regmap *rm;
for (p = l = 0; l < DDB_MAX_LINK; l++) {
info = dev->link[l].info;
/******************************************************************************/
-static struct ddb_regset octopus_input = {
+static const struct ddb_regset octopus_input = {
.base = 0x200,
.num = 0x08,
.size = 0x10,
};
-static struct ddb_regset octopus_output = {
+static const struct ddb_regset octopus_output = {
.base = 0x280,
.num = 0x08,
.size = 0x10,
};
-static struct ddb_regset octopus_idma = {
+static const struct ddb_regset octopus_idma = {
.base = 0x300,
.num = 0x08,
.size = 0x10,
};
-static struct ddb_regset octopus_idma_buf = {
+static const struct ddb_regset octopus_idma_buf = {
.base = 0x2000,
.num = 0x08,
.size = 0x100,
};
-static struct ddb_regset octopus_odma = {
+static const struct ddb_regset octopus_odma = {
.base = 0x380,
.num = 0x04,
.size = 0x10,
};
-static struct ddb_regset octopus_odma_buf = {
+static const struct ddb_regset octopus_odma_buf = {
.base = 0x2800,
.num = 0x04,
.size = 0x100,
};
-static struct ddb_regset octopus_i2c = {
+static const struct ddb_regset octopus_i2c = {
.base = 0x80,
.num = 0x04,
.size = 0x20,
};
-static struct ddb_regset octopus_i2c_buf = {
+static const struct ddb_regset octopus_i2c_buf = {
.base = 0x1000,
.num = 0x04,
.size = 0x200,
/****************************************************************************/
-static struct ddb_regmap octopus_map = {
+static const struct ddb_regmap octopus_map = {
.irq_base_i2c = 0,
.irq_base_idma = 8,
.irq_base_odma = 16,
}
static int ddb_i2c_add(struct ddb *dev, struct ddb_i2c *i2c,
- struct ddb_regmap *regmap, int link, int i, int num)
+ const struct ddb_regmap *regmap, int link,
+ int i, int num)
{
struct i2c_adapter *adap;
u32 i, j, num = 0, l, base;
struct ddb_i2c *i2c;
struct i2c_adapter *adap;
- struct ddb_regmap *regmap;
+ const struct ddb_regmap *regmap;
for (l = 0; l < DDB_MAX_LINK; l++) {
if (!dev->link[l].info)
u32 irq_base_idma;
u32 irq_base_odma;
- struct ddb_regset *i2c;
- struct ddb_regset *i2c_buf;
- struct ddb_regset *idma;
- struct ddb_regset *idma_buf;
- struct ddb_regset *odma;
- struct ddb_regset *odma_buf;
+ const struct ddb_regset *i2c;
+ const struct ddb_regset *i2c_buf;
+ const struct ddb_regset *idma;
+ const struct ddb_regset *idma_buf;
+ const struct ddb_regset *odma;
+ const struct ddb_regset *odma_buf;
- struct ddb_regset *input;
- struct ddb_regset *output;
+ const struct ddb_regset *input;
+ const struct ddb_regset *output;
- struct ddb_regset *channel;
+ const struct ddb_regset *channel;
};
struct ddb_ids {
#define TS_QUIRK_REVERSED 2
#define TS_QUIRK_ALT_OSC 8
u32 tempmon_irq;
- struct ddb_regmap *regmap;
+ const struct ddb_regmap *regmap;
};
/* DMA_SIZE MUST be smaller than 256k and