Revision d60efc6b hw/omap2.c

b/hw/omap2.c
343 343
    }
344 344
}
345 345

  
346
static CPUReadMemoryFunc *omap_gp_timer_readfn[] = {
346
static CPUReadMemoryFunc * const omap_gp_timer_readfn[] = {
347 347
    omap_badwidth_read32,
348 348
    omap_gp_timer_readh,
349 349
    omap_gp_timer_readw,
......
460 460
        s->writeh = (uint16_t) value;
461 461
}
462 462

  
463
static CPUWriteMemoryFunc *omap_gp_timer_writefn[] = {
463
static CPUWriteMemoryFunc * const omap_gp_timer_writefn[] = {
464 464
    omap_badwidth_write32,
465 465
    omap_gp_timer_writeh,
466 466
    omap_gp_timer_write,
......
529 529
    }
530 530
}
531 531

  
532
static CPUReadMemoryFunc *omap_synctimer_readfn[] = {
532
static CPUReadMemoryFunc * const omap_synctimer_readfn[] = {
533 533
    omap_badwidth_read32,
534 534
    omap_synctimer_readh,
535 535
    omap_synctimer_readw,
......
541 541
    OMAP_BAD_REG(addr);
542 542
}
543 543

  
544
static CPUWriteMemoryFunc *omap_synctimer_writefn[] = {
544
static CPUWriteMemoryFunc * const omap_synctimer_writefn[] = {
545 545
    omap_badwidth_write32,
546 546
    omap_synctimer_write,
547 547
    omap_synctimer_write,
......
927 927
    }
928 928
}
929 929

  
930
static CPUReadMemoryFunc *omap_gpio_module_readfn[] = {
930
static CPUReadMemoryFunc * const omap_gpio_module_readfn[] = {
931 931
    omap_gpio_module_readp,
932 932
    omap_gpio_module_readp,
933 933
    omap_gpio_module_read,
934 934
};
935 935

  
936
static CPUWriteMemoryFunc *omap_gpio_module_writefn[] = {
936
static CPUWriteMemoryFunc * const omap_gpio_module_writefn[] = {
937 937
    omap_gpio_module_writep,
938 938
    omap_gpio_module_writep,
939 939
    omap_gpio_module_write,
......
1032 1032
    }
1033 1033
}
1034 1034

  
1035
static CPUReadMemoryFunc *omap_gpif_top_readfn[] = {
1035
static CPUReadMemoryFunc * const omap_gpif_top_readfn[] = {
1036 1036
    omap_gpif_top_read,
1037 1037
    omap_gpif_top_read,
1038 1038
    omap_gpif_top_read,
1039 1039
};
1040 1040

  
1041
static CPUWriteMemoryFunc *omap_gpif_top_writefn[] = {
1041
static CPUWriteMemoryFunc * const omap_gpif_top_writefn[] = {
1042 1042
    omap_gpif_top_write,
1043 1043
    omap_gpif_top_write,
1044 1044
    omap_gpif_top_write,
......
1356 1356
    }
1357 1357
}
1358 1358

  
1359
static CPUReadMemoryFunc *omap_mcspi_readfn[] = {
1359
static CPUReadMemoryFunc * const omap_mcspi_readfn[] = {
1360 1360
    omap_badwidth_read32,
1361 1361
    omap_badwidth_read32,
1362 1362
    omap_mcspi_read,
1363 1363
};
1364 1364

  
1365
static CPUWriteMemoryFunc *omap_mcspi_writefn[] = {
1365
static CPUWriteMemoryFunc * const omap_mcspi_writefn[] = {
1366 1366
    omap_badwidth_write32,
1367 1367
    omap_badwidth_write32,
1368 1368
    omap_mcspi_write,
......
1947 1947
    }
1948 1948
}
1949 1949

  
1950
static CPUReadMemoryFunc *omap_eac_readfn[] = {
1950
static CPUReadMemoryFunc * const omap_eac_readfn[] = {
1951 1951
    omap_badwidth_read16,
1952 1952
    omap_eac_read,
1953 1953
    omap_badwidth_read16,
1954 1954
};
1955 1955

  
1956
static CPUWriteMemoryFunc *omap_eac_writefn[] = {
1956
static CPUWriteMemoryFunc * const omap_eac_writefn[] = {
1957 1957
    omap_badwidth_write16,
1958 1958
    omap_eac_write,
1959 1959
    omap_badwidth_write16,
......
2096 2096
    }
2097 2097
}
2098 2098

  
2099
static CPUReadMemoryFunc *omap_sti_readfn[] = {
2099
static CPUReadMemoryFunc * const omap_sti_readfn[] = {
2100 2100
    omap_badwidth_read32,
2101 2101
    omap_badwidth_read32,
2102 2102
    omap_sti_read,
2103 2103
};
2104 2104

  
2105
static CPUWriteMemoryFunc *omap_sti_writefn[] = {
2105
static CPUWriteMemoryFunc * const omap_sti_writefn[] = {
2106 2106
    omap_badwidth_write32,
2107 2107
    omap_badwidth_write32,
2108 2108
    omap_sti_write,
......
2134 2134
    }
2135 2135
}
2136 2136

  
2137
static CPUReadMemoryFunc *omap_sti_fifo_readfn[] = {
2137
static CPUReadMemoryFunc * const omap_sti_fifo_readfn[] = {
2138 2138
    omap_sti_fifo_read,
2139 2139
    omap_badwidth_read8,
2140 2140
    omap_badwidth_read8,
2141 2141
};
2142 2142

  
2143
static CPUWriteMemoryFunc *omap_sti_fifo_writefn[] = {
2143
static CPUWriteMemoryFunc * const omap_sti_fifo_writefn[] = {
2144 2144
    omap_sti_fifo_write,
2145 2145
    omap_badwidth_write8,
2146 2146
    omap_badwidth_write8,
......
2191 2191
static int omap_l4_io_entries;
2192 2192
static int omap_cpu_io_entry;
2193 2193
static struct omap_l4_entry {
2194
        CPUReadMemoryFunc **mem_read;
2195
        CPUWriteMemoryFunc **mem_write;
2194
        CPUReadMemoryFunc * const *mem_read;
2195
        CPUWriteMemoryFunc * const *mem_write;
2196 2196
        void *opaque;
2197 2197
} *omap_l4_io_entry;
2198
static CPUReadMemoryFunc **omap_l4_io_readb_fn;
2199
static CPUReadMemoryFunc **omap_l4_io_readh_fn;
2200
static CPUReadMemoryFunc **omap_l4_io_readw_fn;
2201
static CPUWriteMemoryFunc **omap_l4_io_writeb_fn;
2202
static CPUWriteMemoryFunc **omap_l4_io_writeh_fn;
2203
static CPUWriteMemoryFunc **omap_l4_io_writew_fn;
2198
static CPUReadMemoryFunc * const *omap_l4_io_readb_fn;
2199
static CPUReadMemoryFunc * const *omap_l4_io_readh_fn;
2200
static CPUReadMemoryFunc * const *omap_l4_io_readw_fn;
2201
static CPUWriteMemoryFunc * const *omap_l4_io_writeb_fn;
2202
static CPUWriteMemoryFunc * const *omap_l4_io_writeh_fn;
2203
static CPUWriteMemoryFunc * const *omap_l4_io_writew_fn;
2204 2204
static void **omap_l4_io_opaque;
2205 2205

  
2206
int l4_register_io_memory(CPUReadMemoryFunc **mem_read,
2207
                CPUWriteMemoryFunc **mem_write, void *opaque)
2206
int l4_register_io_memory(CPUReadMemoryFunc * const *mem_read,
2207
                CPUWriteMemoryFunc * const *mem_write, void *opaque)
2208 2208
{
2209 2209
    omap_l4_io_entry[omap_l4_io_entries].mem_read = mem_read;
2210 2210
    omap_l4_io_entry[omap_l4_io_entries].mem_write = mem_write;
......
2258 2258
    return omap_l4_io_writew_fn[i](omap_l4_io_opaque[i], addr, value);
2259 2259
}
2260 2260

  
2261
static CPUReadMemoryFunc *omap_l4_io_readfn[] = {
2261
static CPUReadMemoryFunc * const omap_l4_io_readfn[] = {
2262 2262
    omap_l4_io_readb,
2263 2263
    omap_l4_io_readh,
2264 2264
    omap_l4_io_readw,
2265 2265
};
2266 2266

  
2267
static CPUWriteMemoryFunc *omap_l4_io_writefn[] = {
2267
static CPUWriteMemoryFunc * const omap_l4_io_writefn[] = {
2268 2268
    omap_l4_io_writeb,
2269 2269
    omap_l4_io_writeh,
2270 2270
    omap_l4_io_writew,
......
2340 2340
    }
2341 2341
}
2342 2342

  
2343
static CPUReadMemoryFunc *omap_l4ta_readfn[] = {
2343
static CPUReadMemoryFunc * const omap_l4ta_readfn[] = {
2344 2344
    omap_badwidth_read16,
2345 2345
    omap_l4ta_read,
2346 2346
    omap_badwidth_read16,
2347 2347
};
2348 2348

  
2349
static CPUWriteMemoryFunc *omap_l4ta_writefn[] = {
2349
static CPUWriteMemoryFunc * const omap_l4ta_writefn[] = {
2350 2350
    omap_badwidth_write32,
2351 2351
    omap_badwidth_write32,
2352 2352
    omap_l4ta_write,
......
2692 2692
    OMAP_BAD_REG(addr);
2693 2693
}
2694 2694

  
2695
static CPUReadMemoryFunc *omap_tap_readfn[] = {
2695
static CPUReadMemoryFunc * const omap_tap_readfn[] = {
2696 2696
    omap_badwidth_read32,
2697 2697
    omap_badwidth_read32,
2698 2698
    omap_tap_read,
2699 2699
};
2700 2700

  
2701
static CPUWriteMemoryFunc *omap_tap_writefn[] = {
2701
static CPUWriteMemoryFunc * const omap_tap_writefn[] = {
2702 2702
    omap_badwidth_write32,
2703 2703
    omap_badwidth_write32,
2704 2704
    omap_tap_write,
......
3414 3414
    }
3415 3415
}
3416 3416

  
3417
static CPUReadMemoryFunc *omap_prcm_readfn[] = {
3417
static CPUReadMemoryFunc * const omap_prcm_readfn[] = {
3418 3418
    omap_badwidth_read32,
3419 3419
    omap_badwidth_read32,
3420 3420
    omap_prcm_read,
3421 3421
};
3422 3422

  
3423
static CPUWriteMemoryFunc *omap_prcm_writefn[] = {
3423
static CPUWriteMemoryFunc * const omap_prcm_writefn[] = {
3424 3424
    omap_badwidth_write32,
3425 3425
    omap_badwidth_write32,
3426 3426
    omap_prcm_write,
......
3784 3784
    }
3785 3785
}
3786 3786

  
3787
static CPUReadMemoryFunc *omap_sysctl_readfn[] = {
3787
static CPUReadMemoryFunc * const omap_sysctl_readfn[] = {
3788 3788
    omap_sysctl_read8,
3789 3789
    omap_badwidth_read32,	/* TODO */
3790 3790
    omap_sysctl_read,
3791 3791
};
3792 3792

  
3793
static CPUWriteMemoryFunc *omap_sysctl_writefn[] = {
3793
static CPUWriteMemoryFunc * const omap_sysctl_writefn[] = {
3794 3794
    omap_sysctl_write8,
3795 3795
    omap_badwidth_write32,	/* TODO */
3796 3796
    omap_sysctl_write,
......
4014 4014
    }
4015 4015
}
4016 4016

  
4017
static CPUReadMemoryFunc *omap_sdrc_readfn[] = {
4017
static CPUReadMemoryFunc * const omap_sdrc_readfn[] = {
4018 4018
    omap_badwidth_read32,
4019 4019
    omap_badwidth_read32,
4020 4020
    omap_sdrc_read,
4021 4021
};
4022 4022

  
4023
static CPUWriteMemoryFunc *omap_sdrc_writefn[] = {
4023
static CPUWriteMemoryFunc * const omap_sdrc_writefn[] = {
4024 4024
    omap_badwidth_write32,
4025 4025
    omap_badwidth_write32,
4026 4026
    omap_sdrc_write,
......
4388 4388
    }
4389 4389
}
4390 4390

  
4391
static CPUReadMemoryFunc *omap_gpmc_readfn[] = {
4391
static CPUReadMemoryFunc * const omap_gpmc_readfn[] = {
4392 4392
    omap_badwidth_read32,	/* TODO */
4393 4393
    omap_badwidth_read32,	/* TODO */
4394 4394
    omap_gpmc_read,
4395 4395
};
4396 4396

  
4397
static CPUWriteMemoryFunc *omap_gpmc_writefn[] = {
4397
static CPUWriteMemoryFunc * const omap_gpmc_writefn[] = {
4398 4398
    omap_badwidth_write32,	/* TODO */
4399 4399
    omap_badwidth_write32,	/* TODO */
4400 4400
    omap_gpmc_write,

Also available in: Unified diff