uint8_t ret;
if (len > 9) {
- hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len);
+ hw_error("%s: FIXME: bad SPI word width %i\n", __func__, len);
}
if (s->p >= ARRAY_SIZE(s->resp)) {
case omap1510:
return 0x03310115;
default:
- hw_error("%s: bad mpu model\n", __FUNCTION__);
+ hw_error("%s: bad mpu model\n", __func__);
}
break;
case omap1510:
return 0xfb47002f;
default:
- hw_error("%s: bad mpu model\n", __FUNCTION__);
+ hw_error("%s: bad mpu model\n", __func__);
}
break;
}
case 0x18: /* ARM_SYSST */
if ((s->clkm.clocking_scheme ^ (value >> 11)) & 7) {
s->clkm.clocking_scheme = (value >> 11) & 7;
- printf("%s: clocking scheme set to %s\n", __FUNCTION__,
+ printf("%s: clocking scheme set to %s\n", __func__,
clkschemename[s->clkm.clocking_scheme]);
}
s->clkm.cold_start &= value & 0x3f;
void omap_mpuio_out_set(struct omap_mpuio_s *s, int line, qemu_irq handler)
{
if (line >= 16 || line < 0)
- hw_error("%s: No GPIO line %i\n", __FUNCTION__, line);
+ hw_error("%s: No GPIO line %i\n", __func__, line);
s->handler[line] = handler;
}
void omap_mpuio_key(struct omap_mpuio_s *s, int row, int col, int down)
{
if (row >= 5 || row < 0)
- hw_error("%s: No key %i-%i\n", __FUNCTION__, col, row);
+ hw_error("%s: No key %i-%i\n", __func__, col, row);
if (down)
s->buttons[row] |= 1 << col;
uWireSlave *slave, int chipselect)
{
if (chipselect < 0 || chipselect > 3) {
- fprintf(stderr, "%s: Bad chipselect %i\n", __FUNCTION__, chipselect);
+ fprintf(stderr, "%s: Bad chipselect %i\n", __func__, chipselect);
exit(-1);
}
if (output != s->output) {
s->output = output;
- printf("%s: Backlight now at %i/256\n", __FUNCTION__, output);
+ printf("%s: Backlight now at %i/256\n", __func__, output);
}
}
case 0x04: /* VRC */
if ((value ^ s->vrc) & 1) {
if (value & 1)
- printf("%s: %iHz buzz on\n", __FUNCTION__, (int)
+ printf("%s: %iHz buzz on\n", __func__, (int)
/* 1.5 MHz from a 12-MHz or 13-MHz PWT_CLK */
((omap_clk_getrate(s->clk) >> 3) /
/* Pre-multiplexer divider */
((value & (1 << 5)) ? 80 : 127) /
(107 * 55 * 63 * 127)));
else
- printf("%s: silence!\n", __FUNCTION__);
+ printf("%s: silence!\n", __func__);
}
s->vrc = value & 0x7f;
break;
{
s->alarm_ti = mktimegm(&s->alarm_tm);
if (s->alarm_ti == -1)
- printf("%s: conversion failed\n", __FUNCTION__);
+ printf("%s: conversion failed\n", __func__);
}
static uint64_t omap_rtc_read(void *opaque, hwaddr addr,
if (!s->rx_rate)
return;
if (s->rx_req)
- printf("%s: Rx FIFO overrun\n", __FUNCTION__);
+ printf("%s: Rx FIFO overrun\n", __func__);
s->rx_req = s->rx_rate << bps[(s->rcr[0] >> 5) & 7];
if (!s->tx_rate)
return;
if (s->tx_req)
- printf("%s: Tx FIFO underrun\n", __FUNCTION__);
+ printf("%s: Tx FIFO underrun\n", __func__);
s->tx_req = s->tx_rate << bps[(s->xcr[0] >> 5) & 7];
/* Fall through. */
case 0x02: /* DRR1 */
if (s->rx_req < 2) {
- printf("%s: Rx FIFO underrun\n", __FUNCTION__);
+ printf("%s: Rx FIFO underrun\n", __func__);
omap_mcbsp_rx_done(s);
} else {
s->tx_req -= 2;
if (s->tx_req < 2)
omap_mcbsp_tx_done(s);
} else
- printf("%s: Tx FIFO overrun\n", __FUNCTION__);
+ printf("%s: Tx FIFO overrun\n", __func__);
return;
case 0x08: /* SPCR2 */
s->spcr[0] &= 0x0006;
s->spcr[0] |= 0xf8f9 & value;
if (value & (1 << 15)) /* DLB */
- printf("%s: Digital Loopback mode enable attempt\n", __FUNCTION__);
+ printf("%s: Digital Loopback mode enable attempt\n", __func__);
if (~value & 1) { /* RRST */
s->spcr[0] &= ~6;
s->rx_req = 0;
s->mcr[1] = value & 0x03e3;
if (value & 3) /* XMCM */
printf("%s: Tx channel selection mode enable attempt\n",
- __FUNCTION__);
+ __func__);
return;
case 0x1a: /* MCR1 */
s->mcr[0] = value & 0x03e1;
if (value & 1) /* RMCM */
printf("%s: Rx channel selection mode enable attempt\n",
- __FUNCTION__);
+ __func__);
return;
case 0x1c: /* RCERA */
s->rcer[0] = value & 0xffff;
if (s->tx_req < 4)
omap_mcbsp_tx_done(s);
} else
- printf("%s: Tx FIFO overrun\n", __FUNCTION__);
+ printf("%s: Tx FIFO overrun\n", __func__);
return;
}
timer_mod(s->tm, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + s->on);
s->cycle = !s->cycle;
- printf("%s: LED is %s\n", __FUNCTION__, s->cycle ? "on" : "off");
+ printf("%s: LED is %s\n", __func__, s->cycle ? "on" : "off");
}
static void omap_lpg_update(struct omap_lpg_s *s)
timer_del(s->tm);
if (on == period && s->on < s->period)
- printf("%s: LED is on\n", __FUNCTION__);
+ printf("%s: LED is on\n", __func__);
else if (on == 0 && s->on)
- printf("%s: LED is off\n", __FUNCTION__);
+ printf("%s: LED is off\n", __func__);
else if (on && (on != s->on || period != s->period)) {
s->cycle = 0;
s->on = on;
if (mode[0] == 1 || mode[0] == 2 || mode[1] == 1 || mode[1] == 2)
fprintf(stderr, "%s: bad EN_54M_PLL or bad EN_96M_PLL\n",
- __FUNCTION__);
+ __func__);
}
static void omap_prcm_dpll_update(struct omap_prcm_s *s)
s->dpll_lock = 0;
switch (mode) {
case 0:
- fprintf(stderr, "%s: bad EN_DPLL\n", __FUNCTION__);
+ fprintf(stderr, "%s: bad EN_DPLL\n", __func__);
break;
case 1: /* Low-power bypass mode (Default) */
case 2: /* Fast-relock bypass mode */
omap_clk_reparent(core, dpll_x2);
break;
case 3:
- fprintf(stderr, "%s: bad CORE_CLK_SRC\n", __FUNCTION__);
+ fprintf(stderr, "%s: bad CORE_CLK_SRC\n", __func__);
break;
}
}
case 0x500: /* CM_CLKEN_PLL */
if (value & 0xffffff30)
fprintf(stderr, "%s: write 0s in CM_CLKEN_PLL for "
- "future compatibility\n", __FUNCTION__);
+ "future compatibility\n", __func__);
if ((s->clken[9] ^ value) & 0xcc) {
s->clken[9] &= ~0xcc;
s->clken[9] |= value & 0xcc;
case 0x540: /* CM_CLKSEL1_PLL */
if (value & 0xfc4000d7)
fprintf(stderr, "%s: write 0s in CM_CLKSEL1_PLL for "
- "future compatibility\n", __FUNCTION__);
+ "future compatibility\n", __func__);
if ((s->clksel[5] ^ value) & 0x003fff00) {
s->clksel[5] = value & 0x03bfff28;
omap_prcm_dpll_update(s);
case 0x544: /* CM_CLKSEL2_PLL */
if (value & ~3)
fprintf(stderr, "%s: write 0s in CM_CLKSEL2_PLL[31:2] for "
- "future compatibility\n", __FUNCTION__);
+ "future compatibility\n", __func__);
if (s->clksel[6] != (value & 3)) {
s->clksel[6] = value & 3;
omap_prcm_dpll_update(s);
{
#ifdef SPY
printf("%s: value %08lx written at " PA_FMT "\n",
- __FUNCTION__, value, offset);
+ __func__, value, offset);
#endif
}
switch (line) {
case 0:
printf("%s: current to MMC/SD card %sabled.\n",
- __FUNCTION__, level ? "dis" : "en");
+ __func__, level ? "dis" : "en");
break;
case 1:
printf("%s: internal speaker amplifier %s.\n",
- __FUNCTION__, level ? "down" : "on");
+ __func__, level ? "down" : "on");
break;
/* These LCD & Audio output signals have not been identified yet. */
case 3:
case 4:
printf("%s: LCD GPIO%i %s.\n",
- __FUNCTION__, line - 1, level ? "high" : "low");
+ __func__, line - 1, level ? "high" : "low");
break;
case 5:
case 6:
printf("%s: Audio GPIO%i %s.\n",
- __FUNCTION__, line - 4, level ? "high" : "low");
+ __func__, line - 4, level ? "high" : "low");
break;
}
}
rom_size = get_image_size(option_rom[0].name);
if (rom_size > flash_size) {
fprintf(stderr, "%s: ROM image too big (%x > %x)\n",
- __FUNCTION__, rom_size, flash_size);
+ __func__, rom_size, flash_size);
rom_size = 0;
}
if (rom_size > 0) {
}
if (rom_size < 0) {
fprintf(stderr, "%s: error loading '%s'\n",
- __FUNCTION__, option_rom[0].name);
+ __func__, option_rom[0].name);
}
}
return s->pm_regs[addr >> 2];
default:
fail:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
break;
}
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
}
return s->cm_regs[CCCR >> 2] | (3 << 28);
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
}
return s->mm_regs[addr >> 2];
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
}
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
}
if (!s->enable)
return 0xffffffff;
if (s->rx_level < 1) {
- printf("%s: SSP Rx Underrun\n", __FUNCTION__);
+ printf("%s: SSP Rx Underrun\n", __func__);
return 0xffffffff;
}
s->rx_level --;
case SSACD:
return s->ssacd;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
s->sscr[0] = value & 0xc7ffffff;
s->enable = value & SSCR0_SSE;
if (value & SSCR0_MOD)
- printf("%s: Attempt to use network mode\n", __FUNCTION__);
+ printf("%s: Attempt to use network mode\n", __func__);
if (s->enable && SSCR0_DSS(value) < 4)
- printf("%s: Wrong data size: %i bits\n", __FUNCTION__,
+ printf("%s: Wrong data size: %i bits\n", __func__,
SSCR0_DSS(value));
if (!(value & SSCR0_SSE)) {
s->sssr = 0;
case SSCR1:
s->sscr[1] = value;
if (value & (SSCR1_LBM | SSCR1_EFWR))
- printf("%s: Attempt to use SSP test mode\n", __FUNCTION__);
+ printf("%s: Attempt to use SSP test mode\n", __func__);
pxa2xx_ssp_fifo_update(s);
break;
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
}
else
return s->last_swcr;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
}
}
s->ibmr = 0;
return s->ibmr;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
}
}
}
return 0;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
s->status &= ~(1 << 7); /* I2SOFF */
}
if (value & (1 << 4)) /* EFWR */
- printf("%s: Attempt to use special function\n", __FUNCTION__);
+ printf("%s: Attempt to use special function\n", __func__);
s->enable = (value & 9) == 1; /* ENB && !RST*/
pxa2xx_i2s_update(s);
break;
case SACR1:
s->control[1] = value & 0x0039;
if (value & (1 << 5)) /* ENLBF */
- printf("%s: Attempt to use loopback function\n", __FUNCTION__);
+ printf("%s: Attempt to use loopback function\n", __func__);
if (value & (1 << 4)) /* DPRL */
s->fifo_len = 0;
pxa2xx_i2s_update(s);
}
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
}
}
pxa2xx_fir_update(s);
return ret;
}
- printf("%s: Rx FIFO underrun.\n", __FUNCTION__);
+ printf("%s: Rx FIFO underrun.\n", __func__);
break;
case ICSR0:
return s->status[0];
case ICFOR:
return s->rx_len;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
break;
}
return 0;
case ICFOR:
break;
default:
- printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);
+ printf("%s: Bad register " REG_FMT "\n", __func__, addr);
}
}
uint32_t mask;
if (line >= s->lines) {
- printf("%s: No GPIO pin %i\n", __FUNCTION__, line);
+ printf("%s: No GPIO pin %i\n", __func__, line);
return;
}
return s->status[bank];
default:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
return 0;
break;
default:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
}
case ICHP: /* Highest Priority register */
return pxa2xx_pic_highest(s);
default:
- printf("%s: Bad register offset " REG_FMT "\n", __FUNCTION__, offset);
+ printf("%s: Bad register offset " REG_FMT "\n", __func__, offset);
return 0;
}
}
s->priority[32 + ((offset - IPR32) >> 2)] = value & 0x8000003f;
break;
default:
- printf("%s: Bad register offset " REG_FMT "\n", __FUNCTION__, offset);
+ printf("%s: Bad register offset " REG_FMT "\n", __func__, offset);
return;
}
pxa2xx_pic_update(opaque);
s->buf[s->len] = data;
if (s->len ++ > 2) {
#ifdef VERBOSE
- fprintf(stderr, "%s: message too long (%i bytes)\n", __FUNCTION__, s->len);
+ fprintf(stderr, "%s: message too long (%i bytes)\n", __func__, s->len);
#endif
return 1;
}
case I2C_START_SEND:
break;
case I2C_START_RECV:
- printf("%s: recv not supported!!!\n", __FUNCTION__);
+ printf("%s: recv not supported!!!\n", __func__);
break;
case I2C_FINISH:
#ifdef VERBOSE
if (s->len < 2)
- printf("%s: message too short (%i bytes)\n", __FUNCTION__, s->len);
+ printf("%s: message too short (%i bytes)\n", __func__, s->len);
if (s->len > 2)
- printf("%s: message too long\n", __FUNCTION__);
+ printf("%s: message too long\n", __func__);
#endif
break;
default:
static int tosa_dac_recv(I2CSlave *s)
{
- printf("%s: recv not supported!!!\n", __FUNCTION__);
+ printf("%s: recv not supported!!!\n", __func__);
return -1;
}
goto fail;
}
dprint(a, 2, "%s: nid %d (%s), verb 0x%x, payload 0x%x\n",
- __FUNCTION__, nid, node->name, verb, payload);
+ __func__, nid, node->name, verb, payload);
switch (verb) {
/* all nodes */
fail:
dprint(a, 1, "%s: not handled: nid %d (%s), verb 0x%x, payload 0x%x\n",
- __FUNCTION__, nid, node ? node->name : "?", verb, payload);
+ __func__, nid, node ? node->name : "?", verb, payload);
hda_codec_response(hda, true, 0);
}
a->desc = desc;
a->name = object_get_typename(OBJECT(a));
- dprint(a, 1, "%s: cad %d\n", __FUNCTION__, a->hda.cad);
+ dprint(a, 1, "%s: cad %d\n", __func__, a->hda.cad);
AUD_register_card("hda", &a->card);
for (i = 0; i < a->desc->nnodes; i++) {
HDAAudioStream *st;
int i;
- dprint(a, 1, "%s\n", __FUNCTION__);
+ dprint(a, 1, "%s\n", __func__);
for (i = 0; i < ARRAY_SIZE(a->st); i++) {
st = a->st + i;
if (st->node == NULL) {
HDAAudioStream *st;
int i;
- dprint(a, 1, "%s\n", __FUNCTION__);
+ dprint(a, 1, "%s\n", __func__);
if (version == 1) {
/* assume running_compat[] is for output streams */
for (i = 0; i < ARRAY_SIZE(a->running_compat); i++)
} else {
level = 0;
}
- dprint(d, 2, "%s: level %d [%s]\n", __FUNCTION__,
+ dprint(d, 2, "%s: level %d [%s]\n", __func__,
level, msi ? "msi" : "intx");
if (msi) {
if (level) {
cad = (verb >> 28) & 0x0f;
if (verb & (1 << 27)) {
/* indirect node addressing, not specified in HDA 1.0 */
- dprint(d, 1, "%s: indirect node addressing (guest bug?)\n", __FUNCTION__);
+ dprint(d, 1, "%s: indirect node addressing (guest bug?)\n", __func__);
return -1;
}
nid = (verb >> 20) & 0x7f;
codec = hda_codec_find(&d->codecs, cad);
if (codec == NULL) {
- dprint(d, 1, "%s: addressed non-existing codec\n", __FUNCTION__);
+ dprint(d, 1, "%s: addressed non-existing codec\n", __func__);
return -1;
}
cdc = HDA_CODEC_DEVICE_GET_CLASS(codec);
uint32_t rp, verb;
if (d->ics & ICH6_IRS_BUSY) {
- dprint(d, 2, "%s: [icw] verb 0x%08x\n", __FUNCTION__, d->icw);
+ dprint(d, 2, "%s: [icw] verb 0x%08x\n", __func__, d->icw);
intel_hda_send_command(d, d->icw);
return;
}
for (;;) {
if (!(d->corb_ctl & ICH6_CORBCTL_RUN)) {
- dprint(d, 2, "%s: !run\n", __FUNCTION__);
+ dprint(d, 2, "%s: !run\n", __func__);
return;
}
if ((d->corb_rp & 0xff) == d->corb_wp) {
- dprint(d, 2, "%s: corb ring empty\n", __FUNCTION__);
+ dprint(d, 2, "%s: corb ring empty\n", __func__);
return;
}
if (d->rirb_count == d->rirb_cnt) {
- dprint(d, 2, "%s: rirb count reached\n", __FUNCTION__);
+ dprint(d, 2, "%s: rirb count reached\n", __func__);
return;
}
verb = ldl_le_pci_dma(&d->pci, addr + 4*rp);
d->corb_rp = rp;
- dprint(d, 2, "%s: [rp 0x%x] verb 0x%08x\n", __FUNCTION__, rp, verb);
+ dprint(d, 2, "%s: [rp 0x%x] verb 0x%08x\n", __func__, rp, verb);
intel_hda_send_command(d, verb);
}
}
if (d->ics & ICH6_IRS_BUSY) {
dprint(d, 2, "%s: [irr] response 0x%x, cad 0x%x\n",
- __FUNCTION__, response, dev->cad);
+ __func__, response, dev->cad);
d->irr = response;
d->ics &= ~(ICH6_IRS_BUSY | 0xf0);
d->ics |= (ICH6_IRS_VALID | (dev->cad << 4));
}
if (!(d->rirb_ctl & ICH6_RBCTL_DMA_EN)) {
- dprint(d, 1, "%s: rirb dma disabled, drop codec response\n", __FUNCTION__);
+ dprint(d, 1, "%s: rirb dma disabled, drop codec response\n", __func__);
return;
}
d->rirb_wp = wp;
dprint(d, 2, "%s: [wp 0x%x] response 0x%x, extra 0x%x\n",
- __FUNCTION__, wp, response, ex);
+ __func__, wp, response, ex);
d->rirb_count++;
if (d->rirb_count == d->rirb_cnt) {
- dprint(d, 2, "%s: rirb count reached (%d)\n", __FUNCTION__, d->rirb_count);
+ dprint(d, 2, "%s: rirb count reached (%d)\n", __func__, d->rirb_count);
if (d->rirb_ctl & ICH6_RBCTL_IRQ_EN) {
d->rirb_sts |= ICH6_RBSTS_IRQ;
intel_hda_update_irq(d);
}
} else if ((d->corb_rp & 0xff) == d->corb_wp) {
- dprint(d, 2, "%s: corb ring empty (%d/%d)\n", __FUNCTION__,
+ dprint(d, 2, "%s: corb ring empty (%d/%d)\n", __func__,
d->rirb_count, d->rirb_cnt);
if (d->rirb_ctl & ICH6_RBCTL_IRQ_EN) {
d->rirb_sts |= ICH6_RBSTS_IRQ;
IntelHDAState* d = opaque;
int i;
- dprint(d, 1, "%s\n", __FUNCTION__);
+ dprint(d, 1, "%s\n", __func__);
for (i = 0; i < ARRAY_SIZE(d->st); i++) {
if (d->st[i].ctl & 0x02) {
intel_hda_parse_bdl(d, &d->st[i]);
#ifdef VERBOSE
if (s->i2c_len < 2)
printf("%s: message too short (%i bytes)\n",
- __FUNCTION__, s->i2c_len);
+ __func__, s->i2c_len);
#endif
break;
default:
#ifdef VERBOSE
default:
- printf("%s: unknown register %02x\n", __FUNCTION__, cmd);
+ printf("%s: unknown register %02x\n", __func__, cmd);
#endif
}
break;
default:
- printf("%s: Unknown NAND command 0x%02x\n", __FUNCTION__, s->cmd);
+ printf("%s: Unknown NAND command 0x%02x\n", __func__, s->cmd);
}
}
DeviceState *dev;
if (nand_flash_ids[chip_id].size == 0) {
- hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__);
+ hw_error("%s: Unsupported NAND chip ID.\n", __func__);
}
dev = DEVICE(object_new(TYPE_NAND));
qdev_prop_set_uint8(dev, "manufacturer_id", manf_id);
case 0xff02: /* ECC Result of spare area data */
case 0xff03: /* ECC Result of main area data */
case 0xff04: /* ECC Result of spare area data */
- hw_error("%s: imeplement ECC\n", __FUNCTION__);
+ hw_error("%s: imeplement ECC\n", __func__);
return 0x0000;
}
fprintf(stderr, "%s: unknown OneNAND register %x\n",
- __FUNCTION__, offset);
+ __func__, offset);
return 0;
}
default:
fprintf(stderr, "%s: unknown OneNAND boot command %"PRIx64"\n",
- __FUNCTION__, value);
+ __func__, value);
}
break;
default:
fprintf(stderr, "%s: unknown OneNAND register %x\n",
- __FUNCTION__, offset);
+ __func__, offset);
}
}
{
if (link->slave->reject_reason)
fprintf(stderr, "%s: stray LMP_not_accepted received, fixme\n",
- __FUNCTION__);
+ __func__);
else
fprintf(stderr, "%s: stray LMP_accepted received, fixme\n",
- __FUNCTION__);
+ __func__);
exit(-1);
}
static void bt_dummy_lmp_disconnect_master(struct bt_link_s *link)
{
- fprintf(stderr, "%s: stray LMP_detach received, fixme\n", __FUNCTION__);
+ fprintf(stderr, "%s: stray LMP_detach received, fixme\n", __func__);
exit(-1);
}
static void bt_dummy_lmp_acl_resp(struct bt_link_s *link,
const uint8_t *data, int start, int len)
{
- fprintf(stderr, "%s: stray ACL response PDU, fixme\n", __FUNCTION__);
+ fprintf(stderr, "%s: stray ACL response PDU, fixme\n", __func__);
exit(-1);
}
while (*p && *p != dev)
p = &(*p)->next;
if (*p != dev) {
- fprintf(stderr, "%s: bad bt device \"%s\"\n", __FUNCTION__,
+ fprintf(stderr, "%s: bad bt device \"%s\"\n", __func__,
dev->lmp_name ?: "(null)");
exit(-1);
}
if (off < FIFO_LEN) {
if (off + len > FIFO_LEN && (s->out_size = off + len) > FIFO_LEN * 2) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, len);
exit(-1);
}
return s->outfifo + off;
}
if (s->out_len > s->out_size) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, len);
exit(-1);
}
s->hci->bdaddr_set(s->hci, s->bd_addr.b);
fprintf(stderr, "%s: bd_address loaded from firmware: "
- "%02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__,
+ "%02x:%02x:%02x:%02x:%02x:%02x\n", __func__,
s->bd_addr.b[0], s->bd_addr.b[1], s->bd_addr.b[2],
s->bd_addr.b[3], s->bd_addr.b[4], s->bd_addr.b[5]);
}
break;
default:
- fprintf(stderr, "%s: got a bad CMD packet\n", __FUNCTION__);
+ fprintf(stderr, "%s: got a bad CMD packet\n", __func__);
return;
}
case H4_NEG_PKT:
if (s->in_hdr != sizeof(csrhci_neg_packet) ||
memcmp(pkt - 1, csrhci_neg_packet, s->in_hdr)) {
- fprintf(stderr, "%s: got a bad NEG packet\n", __FUNCTION__);
+ fprintf(stderr, "%s: got a bad NEG packet\n", __func__);
return;
}
pkt += 2;
case H4_ALIVE_PKT:
if (s->in_hdr != 4 || pkt[1] != 0x55 || pkt[2] != 0x00) {
- fprintf(stderr, "%s: got a bad ALIVE packet\n", __FUNCTION__);
+ fprintf(stderr, "%s: got a bad ALIVE packet\n", __func__);
return;
}
default:
bad_pkt:
/* TODO: error out */
- fprintf(stderr, "%s: got a bad packet\n", __FUNCTION__);
+ fprintf(stderr, "%s: got a bad packet\n", __func__);
break;
}
if (len > 255) {
fprintf(stderr, "%s: HCI event params too long (%ib)\n",
- __FUNCTION__, len);
+ __func__, len);
exit(-1);
}
bt_hci_inquiry_result_with_rssi(hci, slave);
return;
default:
- fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__,
+ fprintf(stderr, "%s: bad inquiry mode %02x\n", __func__,
hci->lm.inquiry_mode);
exit(-1);
}
"the Inquiry command has been issued, a Command "
"Status event has been received for the Inquiry "
"command, and before the Inquiry Complete event "
- "occurs", __FUNCTION__);
+ "occurs", __func__);
bt_hci_event_complete_status(hci, HCI_COMMAND_DISALLOWED);
break;
}
"the Inquiry command has been issued, a Command "
"Status event has been received for the Inquiry "
"command, and before the Inquiry Complete event "
- "occurs", __FUNCTION__);
+ "occurs", __func__);
bt_hci_event_complete_status(hci, HCI_COMMAND_DISALLOWED);
break;
}
short_hci:
fprintf(stderr, "%s: HCI packet too short (%iB)\n",
- __FUNCTION__, length);
+ __func__, length);
bt_hci_event_status(hci, HCI_INVALID_PARAMETERS);
break;
}
if (len + HCI_ACL_HDR_SIZE > sizeof(hci->acl_buf)) {
fprintf(stderr, "%s: can't take ACL packets %i bytes long\n",
- __FUNCTION__, len);
+ __func__, len);
return;
}
memcpy(hci->acl_buf + HCI_ACL_HDR_SIZE, data, len);
if (length < HCI_ACL_HDR_SIZE) {
fprintf(stderr, "%s: ACL packet too short (%iB)\n",
- __FUNCTION__, length);
+ __func__, length);
return;
}
if (bt_hci_handle_bad(hci, handle)) {
fprintf(stderr, "%s: invalid ACL handle %03x\n",
- __FUNCTION__, handle);
+ __func__, handle);
/* TODO: signal an error */
return;
}
if (datalen > length) {
fprintf(stderr, "%s: ACL packet too short (%iB < %iB)\n",
- __FUNCTION__, length, datalen);
+ __func__, length, datalen);
return;
}
hci->asb_handle = handle;
else if (handle != hci->asb_handle) {
fprintf(stderr, "%s: Bad handle %03x in Active Slave Broadcast\n",
- __FUNCTION__, handle);
+ __func__, handle);
/* TODO: signal an error */
return;
}
hci->psb_handle = handle;
else if (handle != hci->psb_handle) {
fprintf(stderr, "%s: Bad handle %03x in Parked Slave Broadcast\n",
- __FUNCTION__, handle);
+ __func__, handle);
/* TODO: signal an error */
return;
}
if (bt_hci_handle_bad(hci, handle)) {
fprintf(stderr, "%s: invalid SCO handle %03x\n",
- __FUNCTION__, handle);
+ __func__, handle);
return;
}
if (datalen > length) {
fprintf(stderr, "%s: SCO packet too short (%iB < %iB)\n",
- __FUNCTION__, length, datalen);
+ __func__, length, datalen);
return;
}
return;
bad:
fprintf(stderr, "%s: bad transaction on Interrupt channel.\n",
- __FUNCTION__);
+ __func__);
}
/* "Virtual cable" plug/unplug event. */
if (likely(ch)) {
if (ch->remote_cid != source_cid) {
fprintf(stderr, "%s: Ignoring a Disconnection Request with the "
- "invalid SCID %04x.\n", __FUNCTION__, source_cid);
+ "invalid SCID %04x.\n", __func__, source_cid);
return;
}
/* TODO: do the IDs really have to be in sequence? */
if (!id || (id != l2cap->last_id && id != l2cap->next_id)) {
fprintf(stderr, "%s: out of sequence command packet ignored.\n",
- __FUNCTION__);
+ __func__);
return;
}
#else
/* We never issue commands other than Command Reject currently. */
fprintf(stderr, "%s: stray Command Reject (%02x, %04x) "
- "packet, ignoring.\n", __FUNCTION__, id,
+ "packet, ignoring.\n", __func__, id,
le16_to_cpu(((l2cap_cmd_rej *) params)->reason));
break;
/* We never issue Connection Requests currently. TODO */
fprintf(stderr, "%s: unexpected Connection Response (%02x) "
- "packet, ignoring.\n", __FUNCTION__, id);
+ "packet, ignoring.\n", __func__, id);
break;
case L2CAP_CONF_REQ:
((l2cap_conf_rsp *) params)->data,
len - L2CAP_CONF_RSP_SIZE(0)))
fprintf(stderr, "%s: unexpected Configure Response (%02x) "
- "packet, ignoring.\n", __FUNCTION__, id);
+ "packet, ignoring.\n", __func__, id);
break;
case L2CAP_DISCONN_REQ:
/* We never issue Disconnection Requests currently. TODO */
fprintf(stderr, "%s: unexpected Disconnection Response (%02x) "
- "packet, ignoring.\n", __FUNCTION__, id);
+ "packet, ignoring.\n", __func__, id);
break;
case L2CAP_ECHO_REQ:
case L2CAP_ECHO_RSP:
/* We never issue Echo Requests currently. TODO */
fprintf(stderr, "%s: unexpected Echo Response (%02x) "
- "packet, ignoring.\n", __FUNCTION__, id);
+ "packet, ignoring.\n", __func__, id);
break;
case L2CAP_INFO_REQ:
/* We never issue Information Requests currently. TODO */
fprintf(stderr, "%s: unexpected Information Response (%02x) "
- "packet, ignoring.\n", __FUNCTION__, id);
+ "packet, ignoring.\n", __func__, id);
break;
default:
if (unlikely(cid >= L2CAP_CID_MAX || !l2cap->cid[cid])) {
fprintf(stderr, "%s: frame addressed to a non-existent L2CAP "
- "channel %04x received.\n", __FUNCTION__, cid);
+ "channel %04x received.\n", __func__, cid);
return;
}
if (len > chan->params.remote_mtu) {
fprintf(stderr, "%s: B-Frame for CID %04x longer than %i octets.\n",
- __FUNCTION__,
+ __func__,
chan->remote_cid, chan->params.remote_mtu);
exit(-1);
}
if (new_psm) {
fprintf(stderr, "%s: PSM %04x already registered for device `%s'.\n",
- __FUNCTION__, psm, dev->device.lmp_name);
+ __func__, psm, dev->device.lmp_name);
exit(-1);
}
int rsp_len = 0;
if (len < 5) {
- fprintf(stderr, "%s: short SDP PDU (%iB).\n", __FUNCTION__, len);
+ fprintf(stderr, "%s: short SDP PDU (%iB).\n", __func__, len);
return;
}
if (len != plen) {
fprintf(stderr, "%s: wrong SDP PDU length (%iB != %iB).\n",
- __FUNCTION__, plen, len);
+ __func__, plen, len);
err = SDP_INVALID_PDU_SIZE;
goto respond;
}
case SDP_SVC_SEARCH_ATTR_RSP:
default:
fprintf(stderr, "%s: unexpected SDP PDU ID %02x.\n",
- __FUNCTION__, pdu_id);
+ __func__, pdu_id);
err = SDP_INVALID_SYNTAX;
break;
}
return s->gpio_pdown;
default:
- fprintf(stderr, "%s: unknown register %02x\n", __FUNCTION__, reg);
+ fprintf(stderr, "%s: unknown register %02x\n", __func__, reg);
return 0;
}
}
s->pll_mode = value & 0x77;
if ((value & 3) == 0 || (value & 3) == 3)
fprintf(stderr, "%s: wrong PLL Control bits (%i)\n",
- __FUNCTION__, value & 3);
+ __func__, value & 3);
break;
case 0x0e: /* Clock-Source Select */
case 0x28: /* LCD Panel Configuration */
s->lcd_config = value & 0xff;
if (value & (1 << 7))
- fprintf(stderr, "%s: data swap not supported!\n", __FUNCTION__);
+ fprintf(stderr, "%s: data swap not supported!\n", __func__);
break;
case 0x2a: /* LCD Horizontal Display Width */
s->hssi_config[1] = value;
if (((value >> 4) & 3) == 3)
fprintf(stderr, "%s: Illegal active-data-links value\n",
- __FUNCTION__);
+ __func__);
break;
case 0x42: /* High-speed Serial Interface Tx Mode */
s->hssi_config[2] = value & 0xbd;
s->enable = value & 1;
s->blank = (value >> 1) & 1;
if (value & (1 << 4))
- fprintf(stderr, "%s: Macrovision enable attempt!\n", __FUNCTION__);
+ fprintf(stderr, "%s: Macrovision enable attempt!\n", __func__);
break;
case 0x6a: /* Special Effects */
s->bpp = blizzard_iformat_bpp[s->iformat];
if (!s->bpp)
fprintf(stderr, "%s: Illegal or unsupported input format %x\n",
- __FUNCTION__, s->iformat);
+ __func__, s->iformat);
break;
case 0x8e: /* Data Source Select */
s->source = value & 7;
!((s->ix[1] - s->ix[0]) & (s->iy[1] - s->iy[0]) &
(s->ox[1] - s->ox[0]) & (s->oy[1] - s->oy[0]) & 1))
fprintf(stderr, "%s: Illegal input/output window positions\n",
- __FUNCTION__);
+ __func__);
blizzard_transfer_setup(s);
break;
s->pm = value & 0x83;
if (value & s->mode & 1)
fprintf(stderr, "%s: The display must be disabled before entering "
- "Standby Mode\n", __FUNCTION__);
+ "Standby Mode\n", __func__);
break;
case 0xe8: /* Non-display Period Control / Status */
s->status = value & 0x1b;
break;
default:
- fprintf(stderr, "%s: unknown register %02x\n", __FUNCTION__, reg);
+ fprintf(stderr, "%s: unknown register %02x\n", __func__, reg);
break;
}
}
s->dispc.l[0].attr = value & 0x7ff;
if (value & (3 << 9))
fprintf(stderr, "%s: Big-endian pixel format not supported\n",
- __FUNCTION__);
+ __func__);
s->dispc.l[0].enable = value & 1;
s->dispc.l[0].bpp = (value >> 1) & 0xf;
s->dispc.invalidate = 1;
if (s->rfbi.control & (1 << 1)) { /* BYPASS */
/* TODO: in non-Bypass mode we probably need to just assert the
* DRQ and wait for DMA to write the pixels. */
- fprintf(stderr, "%s: Bypass mode unimplemented\n", __FUNCTION__);
+ fprintf(stderr, "%s: Bypass mode unimplemented\n", __func__);
return;
}
void omap_rfbi_attach(struct omap_dss_s *s, int cs, struct rfbi_chip_s *chip)
{
if (cs < 0 || cs > 1)
- hw_error("%s: wrong CS %i\n", __FUNCTION__, cs);
+ hw_error("%s: wrong CS %i\n", __func__, cs);
s->rfbi.chip[cs] = chip;
}
default:
fail:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
return 0;
s->status[0] |= LCSR0_QD;
if (!(s->control[0] & LCCR0_LCDT) && (value & LCCR0_LCDT))
- printf("%s: internal frame buffer unsupported\n", __FUNCTION__);
+ printf("%s: internal frame buffer unsupported\n", __func__);
if ((s->control[3] & LCCR3_API) &&
(value & LCCR0_ENB) && !(value & LCCR0_LCDT))
case OVL1C1:
if (!(s->ovl1c[0] & OVLC1_EN) && (value & OVLC1_EN))
- printf("%s: Overlay 1 not supported\n", __FUNCTION__);
+ printf("%s: Overlay 1 not supported\n", __func__);
s->ovl1c[0] = value & 0x80ffffff;
s->dma_ch[1].up = (value & OVLC1_EN) || (s->control[0] & LCCR0_SDS);
case OVL2C1:
if (!(s->ovl2c[0] & OVLC1_EN) && (value & OVLC1_EN))
- printf("%s: Overlay 2 not supported\n", __FUNCTION__);
+ printf("%s: Overlay 2 not supported\n", __func__);
s->ovl2c[0] = value & 0x80ffffff;
s->dma_ch[2].up = !!(value & OVLC1_EN);
case CCR:
if (!(s->ccr & CCR_CEN) && (value & CCR_CEN))
- printf("%s: Hardware cursor unimplemented\n", __FUNCTION__);
+ printf("%s: Hardware cursor unimplemented\n", __func__);
s->ccr = value & 0x81ffffe7;
s->dma_ch[5].up = !!(value & CCR_CEN);
default:
fail:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
}
s->dest_width = 4;
break;
default:
- fprintf(stderr, "%s: Bad color depth\n", __FUNCTION__);
+ fprintf(stderr, "%s: Bad color depth\n", __func__);
exit(1);
}
qxl->guest_primary.bits_pp = 32;
break;
default:
- fprintf(stderr, "%s: unhandled format: %x\n", __FUNCTION__,
+ fprintf(stderr, "%s: unhandled format: %x\n", __func__,
qxl->guest_primary.surface.format);
qxl->guest_primary.bytes_pp = 4;
qxl->guest_primary.bits_pp = 32;
break;
default:
fprintf(stderr, "%s: not implemented: type %d\n",
- __FUNCTION__, cursor->header.type);
+ __func__, cursor->header.type);
goto fail;
}
return c;
}
if (qxl->debug > 1 && cmd->type != QXL_CURSOR_MOVE) {
- fprintf(stderr, "%s", __FUNCTION__);
+ fprintf(stderr, "%s", __func__);
qxl_log_cmd_cursor(qxl, cmd, ext->group_id);
fprintf(stderr, "\n");
}
#define PCI_QXL(obj) OBJECT_CHECK(PCIQXLDevice, (obj), TYPE_PCI_QXL)
#define PANIC_ON(x) if ((x)) { \
- printf("%s: PANIC %s failed\n", __FUNCTION__, #x); \
+ printf("%s: PANIC %s failed\n", __func__, #x); \
abort(); \
}
// TC6393xbState *s = opaque;
if (line > TC6393XB_GPIOS) {
- printf("%s: No GPIO pin %i\n", __FUNCTION__, line);
+ printf("%s: No GPIO pin %i\n", __func__, line);
return;
}
}
if (oops) /* should not happen */
xen_pv_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp?\n",
- __FUNCTION__, xenfb->depth, bpp);
+ __func__, xenfb->depth, bpp);
dpy_gfx_update(xenfb->con, x, y, w, h);
}
a->pck_element = 0;
if (unlikely(!ch->elements || !ch->frames)) {
- printf("%s: bad DMA request\n", __FUNCTION__);
+ printf("%s: bad DMA request\n", __func__);
return;
}
continue;
#endif
printf("%s: Bus time-out in DMA%i operation\n",
- __FUNCTION__, dma->num);
+ __func__, dma->num);
}
min_elems = INT_MAX;
ch->pack[0] = (value & 0x0040) >> 6;
ch->port[0] = (enum omap_dma_port) ((value & 0x003c) >> 2);
if (ch->port[0] >= __omap_dma_port_last)
- printf("%s: invalid DMA port %i\n", __FUNCTION__,
+ printf("%s: invalid DMA port %i\n", __func__,
ch->port[0]);
if (ch->port[1] >= __omap_dma_port_last)
- printf("%s: invalid DMA port %i\n", __FUNCTION__,
+ printf("%s: invalid DMA port %i\n", __func__,
ch->port[1]);
ch->data_type = 1 << (value & 3);
if ((value & 3) == 3) {
- printf("%s: bad data_type for DMA channel\n", __FUNCTION__);
+ printf("%s: bad data_type for DMA channel\n", __func__);
ch->data_type >>= 1;
}
break;
case 0x482: /* DMA_PCh1_SR */
case 0x4c0: /* DMA_PChD_SR_0 */
printf("%s: Physical Channel Status Registers not implemented.\n",
- __FUNCTION__);
+ __func__);
*ret = 0xff;
break;
omap_dma_reset(s->dma);
s->ocp = value & 0x3321;
if (((s->ocp >> 12) & 3) == 3) /* MIDLEMODE */
- fprintf(stderr, "%s: invalid DMA power mode\n", __FUNCTION__);
+ fprintf(stderr, "%s: invalid DMA power mode\n", __func__);
return;
case 0x78: /* DMA4_GCR */
s->gcr = value & 0x00ff00ff;
if ((value & 0xff) == 0x00) /* MAX_CHANNEL_FIFO_DEPTH */
- fprintf(stderr, "%s: wrong FIFO depth in GCR\n", __FUNCTION__);
+ fprintf(stderr, "%s: wrong FIFO depth in GCR\n", __func__);
return;
case 0x80 ... 0xfff:
ch->src_sync = (value >> 24) & 1; /* XXX For CamDMA must be 1 */
if (ch->buf_disable && !ch->src_sync)
fprintf(stderr, "%s: Buffering disable is not allowed in "
- "destination synchronised mode\n", __FUNCTION__);
+ "destination synchronised mode\n", __func__);
ch->prefetch = (value >> 23) & 1;
ch->bs = (value >> 18) & 1;
ch->transparent_copy = (value >> 17) & 1;
ch->fs = (value & 0x0020) >> 5;
if (ch->fs && ch->bs && ch->mode[0] && ch->mode[1])
fprintf(stderr, "%s: For a packet transfer at least one port "
- "must be constant-addressed\n", __FUNCTION__);
+ "must be constant-addressed\n", __func__);
ch->sync = (value & 0x001f) | ((value >> 14) & 0x0060);
/* XXX must be 0x01 for CamDMA */
ch->endian_lock[1] =(value >> 18) & 1;
if (ch->endian[0] != ch->endian[1])
fprintf(stderr, "%s: DMA endianness conversion enable attempt\n",
- __FUNCTION__);
+ __func__);
ch->write_mode = (value >> 16) & 3;
ch->burst[1] = (value & 0xc000) >> 14;
ch->pack[1] = (value & 0x2000) >> 13;
ch->translate[0] = (value & 0x003c) >> 2;
if (ch->translate[0] | ch->translate[1])
fprintf(stderr, "%s: bad MReqAddressTranslate sideband signal\n",
- __FUNCTION__);
+ __func__);
ch->data_type = 1 << (value & 3);
if ((value & 3) == 3) {
- printf("%s: bad data_type for DMA channel\n", __FUNCTION__);
+ printf("%s: bad data_type for DMA channel\n", __func__);
ch->data_type >>= 1;
}
break;
s->chan[ch].dest &= ~3;
if (s->chan[ch].cmd & (DCMD_CMPEN | DCMD_FLYBYS | DCMD_FLYBYT))
- printf("%s: unsupported mode in channel %i\n", __FUNCTION__, ch);
+ printf("%s: unsupported mode in channel %i\n", __func__, ch);
if (s->chan[ch].cmd & DCMD_STARTIRQEN)
s->chan[ch].state |= DCSR_STARTINTR;
unsigned int channel;
if (size != 4) {
- hw_error("%s: Bad access width\n", __FUNCTION__);
+ hw_error("%s: Bad access width\n", __func__);
return 5;
}
}
}
- hw_error("%s: Bad offset 0x" TARGET_FMT_plx "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset 0x" TARGET_FMT_plx "\n", __func__, offset);
return 7;
}
unsigned int channel;
if (size != 4) {
- hw_error("%s: Bad access width\n", __FUNCTION__);
+ hw_error("%s: Bad access width\n", __func__);
return;
}
if (value & DRCMR_MAPVLD)
if ((value & DRCMR_CHLNUM) > s->channels)
hw_error("%s: Bad DMA channel %i\n",
- __FUNCTION__, (unsigned)value & DRCMR_CHLNUM);
+ __func__, (unsigned)value & DRCMR_CHLNUM);
s->req[channel] = value;
break;
break;
}
fail:
- hw_error("%s: Bad offset " TARGET_FMT_plx "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " TARGET_FMT_plx "\n", __func__, offset);
}
}
PXA2xxDMAState *s = opaque;
int ch;
if (req_num < 0 || req_num >= PXA2XX_DMA_NUM_REQUESTS)
- hw_error("%s: Bad DMA request %i\n", __FUNCTION__, req_num);
+ hw_error("%s: Bad DMA request %i\n", __func__, req_num);
if (!(s->req[req_num] & DRCMR_MAPVLD))
return;
default:
#ifdef VERBOSE
- printf("%s: unknown register %02x\n", __FUNCTION__, s->command);
+ printf("%s: unknown register %02x\n", __func__, s->command);
#endif
break;
}
if (s->len ++ > 1) {
#ifdef VERBOSE
- printf("%s: message too long (%i bytes)\n", __FUNCTION__, s->len);
+ printf("%s: message too long (%i bytes)\n", __func__, s->len);
#endif
return 1;
}
break;
default:
#ifdef VERBOSE
- printf("%s: unknown register %02x\n", __FUNCTION__, s->command);
+ printf("%s: unknown register %02x\n", __func__, s->command);
#endif
return 1;
}
case I2C_FINISH:
#ifdef VERBOSE
if (s->len == 1)
- printf("%s: message too short (%i bytes)\n", __FUNCTION__, s->len);
+ printf("%s: message too short (%i bytes)\n", __func__, s->len);
#endif
break;
default:
case 0x10: /* GPIO_SYSCONFIG */
if (((value >> 3) & 3) == 3)
- fprintf(stderr, "%s: bad IDLEMODE value\n", __FUNCTION__);
+ fprintf(stderr, "%s: bad IDLEMODE value\n", __func__);
if (value & 2)
omap2_gpio_module_reset(s);
s->config[0] = value & 0x1d;
}
if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */
fprintf(stderr, "%s: I^2C slave mode not supported\n",
- __FUNCTION__);
+ __func__);
break;
}
if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */
fprintf(stderr, "%s: 10-bit addressing mode not supported\n",
- __FUNCTION__);
+ __func__);
break;
}
if ((value & (1 << 15)) && value & (1 << 0)) { /* STT */
omap_i2c_interrupts_update(s);
}
if (value & (1 << 15)) /* ST_EN */
- fprintf(stderr, "%s: System Test not supported\n", __FUNCTION__);
+ fprintf(stderr, "%s: System Test not supported\n", __func__);
break;
default:
g_assert(is_ncq(ncq_fis->command));
if (ncq_tfs->used) {
/* error - already in use */
- fprintf(stderr, "%s: tag %d already used\n", __FUNCTION__, tag);
+ fprintf(stderr, "%s: tag %d already used\n", __func__, tag);
return;
}
return 0x00;
#ifdef VERBOSE
default:
- printf("%s: Bad attribute space register %02x\n", __FUNCTION__, at);
+ printf("%s: Bad attribute space register %02x\n", __func__, at);
#endif
}
case 0x06: /* Socket and Copy Register */
break;
default:
- printf("%s: Bad attribute space register %02x\n", __FUNCTION__, at);
+ printf("%s: Bad attribute space register %02x\n", __func__, at);
}
}
default:
lm_kbd_error(s, ERR_CMDUNK);
- fprintf(stderr, "%s: unknown command %02x\n", __FUNCTION__, reg);
+ fprintf(stderr, "%s: unknown command %02x\n", __func__, reg);
return 0x00;
}
if ((value & 3) && (value & 3) != 3) {
lm_kbd_error(s, ERR_BADPAR);
fprintf(stderr, "%s: invalid clock setting in RCPWM\n",
- __FUNCTION__);
+ __func__);
}
/* TODO: Validate that the command is only issued once */
break;
break;
default:
lm_kbd_error(s, ERR_CMDUNK);
- fprintf(stderr, "%s: unknown command %02x\n", __FUNCTION__, reg);
+ fprintf(stderr, "%s: unknown command %02x\n", __func__, reg);
break;
}
}
return s->kpkdi;
break;
default:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
return 0;
break;
default:
- hw_error("%s: Bad offset " REG_FMT "\n", __FUNCTION__, offset);
+ hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset);
}
}
const struct keymap *map, int size)
{
if(!map || size < 0x80) {
- fprintf(stderr, "%s - No PXA keypad map defined\n", __FUNCTION__);
+ fprintf(stderr, "%s - No PXA keypad map defined\n", __func__);
exit(-1);
}
if (s->enabled != !(data & 0x4000)) {
s->enabled = !(data & 0x4000);
fprintf(stderr, "%s: touchscreen sense %sabled\n",
- __FUNCTION__, s->enabled ? "en" : "dis");
+ __func__, s->enabled ? "en" : "dis");
if (s->busy && !s->enabled)
timer_del(s->timer);
s->busy = s->busy && s->enabled;
s->timing[0] = data & 0x1fff;
if ((s->timing[0] >> 11) == 3)
fprintf(stderr, "%s: illegal conversion clock setting\n",
- __FUNCTION__);
+ __func__);
break;
case 0xd: /* CFR1 */
s->timing[1] = data & 0xf07;
default:
fprintf(stderr, "%s: write into read-only register %x\n",
- __FUNCTION__, reg);
+ __func__, reg);
}
}
if (s->enabled != !(value & 1)) {
s->enabled = !(value & 1);
fprintf(stderr, "%s: touchscreen sense %sabled\n",
- __FUNCTION__, s->enabled ? "en" : "dis");
+ __func__, s->enabled ? "en" : "dis");
if (s->busy && !s->enabled)
timer_del(s->timer);
s->busy = s->busy && s->enabled;
rate->fsref == ((s->audio_ctrl3 >> 13) & 1))/* REFFS */
break;
if (!rate->rate) {
- printf("%s: unknown sampling rate configured\n", __FUNCTION__);
+ printf("%s: unknown sampling rate configured\n", __func__);
return;
}
uint32_t ret = 0;
if (len != 16)
- hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len);
+ hw_error("%s: FIXME: bad SPI word width %i\n", __func__, len);
/* TODO: sequential reads etc - how do we make sure the host doesn't
* unintentionally read out a conversion result from a register while
* for every register, see Chapter 3 and 4 for privileged mode. */
if (value & 1)
fprintf(stderr, "%s: protection mode enable attempt\n",
- __FUNCTION__);
+ __func__);
return;
case 0x50: /* INTC_IDLE */
//#define DEBUG_VT82C686B
#ifdef DEBUG_VT82C686B
-#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__)
+#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
#else
#define DPRINTF(fmt, ...)
#endif
//#define DEBUG
#ifdef DEBUG
-#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__)
+#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
#else
#define DPRINTF(fmt, ...)
#endif
s->slave[s->addr]->io(s->slave[s->addr]->opaque,
s->rw, s->reg, &s->val);
else
- hw_error("%s: bad slave address %i\n", __FUNCTION__, s->addr);
+ hw_error("%s: bad slave address %i\n", __func__, s->addr);
}
static void cbus_cycle(CBusPriv *s)
return 0x0000;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
break;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
return 0x0000;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
if (s->backlight != (val & 0x7f)) {
s->backlight = val & 0x7f;
printf("%s: LCD backlight now at %i / 127\n",
- __FUNCTION__, s->backlight);
+ __func__, s->backlight);
}
break;
break;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
for (i = mpu->clks; i->name; i ++)
if (!strcmp(i->name, name) || (i->alias && !strcmp(i->alias, name)))
return i;
- hw_error("%s: %s not found\n", __FUNCTION__, name);
+ hw_error("%s: %s not found\n", __func__, name);
}
void omap_clk_get(struct clk *clk)
void omap_clk_put(struct clk *clk)
{
if (!(clk->usecount --))
- hw_error("%s: %s is not in use\n", __FUNCTION__, clk->name);
+ hw_error("%s: %s is not in use\n", __func__, clk->name);
}
static void omap_clk_update(struct clk *clk)
case 0x010: /* GPMC_SYSCONFIG */
if ((value >> 3) == 0x3)
fprintf(stderr, "%s: bad SDRAM idle mode %"PRIi64"\n",
- __FUNCTION__, value >> 3);
+ __func__, value >> 3);
if (value & 2)
omap_gpmc_reset(s);
s->sysconfig = value & 0x19;
break;
case 0x230: /* GPMC_TESTMODE_CTRL */
if (value & 7)
- fprintf(stderr, "%s: test mode enable attempt\n", __FUNCTION__);
+ fprintf(stderr, "%s: test mode enable attempt\n", __func__);
break;
default:
assert(iomem);
if (cs < 0 || cs >= 8) {
- fprintf(stderr, "%s: bad chip-select %i\n", __FUNCTION__, cs);
+ fprintf(stderr, "%s: bad chip-select %i\n", __func__, cs);
exit(-1);
}
f = &s->cs_file[cs];
break;
}
if (!ta) {
- fprintf(stderr, "%s: bad target agent (%i)\n", __FUNCTION__, cs);
+ fprintf(stderr, "%s: bad target agent (%i)\n", __func__, cs);
exit(-1);
}
hwaddr base;
if (region < 0 || region >= ta->regions) {
- fprintf(stderr, "%s: bad io region (%i)\n", __FUNCTION__, region);
+ fprintf(stderr, "%s: bad io region (%i)\n", __func__, region);
exit(-1);
}
case 0x10: /* SDRC_SYSCONFIG */
if ((value >> 3) != 0x2)
fprintf(stderr, "%s: bad SDRAM idle mode %i\n",
- __FUNCTION__, (unsigned)value >> 3);
+ __func__, (unsigned)value >> 3);
if (value & 2)
omap_sdrc_reset(s);
s->config = value & 0x18;
case omap3430:
return 0x1b7ae02f; /* ES 2 */
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x208: /* PRODUCTION_ID_reg for OMAP2 */
case omap3430:
return 0x000000f0;
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x20c:
case omap3430:
return 0xcafeb7ae; /* ES 2 */
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x218: /* DIE_ID_reg */
case TMP105_REG_CONFIG:
if (s->buf[0] & ~s->config & (1 << 0)) /* SD */
- printf("%s: TMP105 shutdown\n", __FUNCTION__);
+ printf("%s: TMP105 shutdown\n", __func__);
s->config = s->buf[0];
s->faults = tmp105_faultq[(s->config >> 3) & 3]; /* F */
tmp105_alarm_update(s);
//#define DEBUG_BONITO
#ifdef DEBUG_BONITO
-#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__)
+#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
#else
#define DPRINTF(fmt, ...)
#endif
if ((value ^ s->ch[ch].config) & (3 << 14)) /* DMAR | DMAW */
omap_mcspi_dmarequest_update(s->ch + ch);
if (((value >> 12) & 3) == 3) /* TRM */
- fprintf(stderr, "%s: invalid TRM value (3)\n", __FUNCTION__);
+ fprintf(stderr, "%s: invalid TRM value (3)\n", __func__);
if (((value >> 7) & 0x1f) < 3) /* WL */
fprintf(stderr, "%s: invalid WL value (%" PRIx64 ")\n",
- __FUNCTION__, (value >> 7) & 0x1f);
+ __func__, (value >> 7) & 0x1f);
s->ch[ch].config = value & 0x7fffff;
break;
int chipselect)
{
if (chipselect < 0 || chipselect >= s->chnum)
- hw_error("%s: Bad chipselect %i\n", __FUNCTION__, chipselect);
+ hw_error("%s: Bad chipselect %i\n", __func__, chipselect);
s->ch[chipselect].txrx = txrx;
s->ch[chipselect].opaque = opaque;
s->config = value & 0x33d;
if (((value >> 3) & 3) == 3) /* IDLEMODE */
fprintf(stderr, "%s: illegal IDLEMODE value in TIOCP_CFG\n",
- __FUNCTION__);
+ __func__);
if (value & 2) /* SOFTRESET */
omap_gp_timer_reset(s);
break;
s->st = (value >> 0) & 1;
if (s->inout && s->trigger != gpt_trigger_none)
fprintf(stderr, "%s: GP timer pin must be an output "
- "for this trigger mode\n", __FUNCTION__);
+ "for this trigger mode\n", __func__);
if (!s->inout && s->capture != gpt_capture_none)
fprintf(stderr, "%s: GP timer pin must be an input "
- "for this capture mode\n", __FUNCTION__);
+ "for this capture mode\n", __func__);
if (s->trigger == gpt_trigger_none)
omap_gp_timer_out(s, s->scpwm);
/* TODO: make sure this doesn't overflow 32-bits */
default:
#ifdef VERBOSE
- printf("%s: unknown register %02x\n", __FUNCTION__, addr);
+ printf("%s: unknown register %02x\n", __func__, addr);
#endif
break;
}
rtc_badness:
default:
fprintf(stderr, "%s: bad RTC_UPDATE value %02x\n",
- __FUNCTION__, value);
+ __func__, value);
s->status |= 1 << 10; /* RTCERR */
menelaus_update(s);
}
default:
#ifdef VERBOSE
- printf("%s: unknown register %02x\n", __FUNCTION__, addr);
+ printf("%s: unknown register %02x\n", __func__, addr);
#endif
}
}
break;
default:
- fprintf(stderr, "%s: %d unknown type %d (len %zd)\n", __FUNCTION__,
+ fprintf(stderr, "%s: %d unknown type %d (len %zd)\n", __func__,
dev->addr, type, len);
break;
}
if (off <= DFIFO_LEN_MASK) {
if (off + len > DFIFO_LEN_MASK + 1 &&
(fifo->dsize = off + len) > (DFIFO_LEN_MASK + 1) * 2) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, len);
exit(-1);
}
buf = fifo->data + off;
} else {
if (fifo->dlen > fifo->dsize) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ fprintf(stderr, "%s: can't alloc %i bytes\n", __func__, len);
exit(-1);
}
buf = fifo->data + off - fifo->dsize;
/* #define MUSB_DEBUG */
#ifdef MUSB_DEBUG
-#define TRACE(fmt,...) fprintf(stderr, "%s@%d: " fmt "\n", __FUNCTION__, \
- __LINE__, ##__VA_ARGS__)
+#define TRACE(fmt, ...) fprintf(stderr, "%s@%d: " fmt "\n", __func__, \
+ __LINE__, ##__VA_ARGS__)
#else
#define TRACE(...)
#endif
}
printf("%s: unknown register at %03x\n",
- __FUNCTION__, (int) (addr & 0xfff));
+ __func__, (int) (addr & 0xfff));
return 0;
}
}
printf("%s: unknown register at %03x\n",
- __FUNCTION__, (int) (addr & 0xfff));
+ __func__, (int) (addr & 0xfff));
return 0;
}
return 0x54059adf;
}
- printf("%s: unknown register at %03x\n", __FUNCTION__, offset);
+ printf("%s: unknown register at %03x\n", __func__, offset);
return 0;
}
default:
printf("%s: unknown register at %03x\n",
- __FUNCTION__, (int) (addr & 0xfff));
+ __func__, (int) (addr & 0xfff));
return;
}
}
default:
printf("%s: unknown register at %03x\n",
- __FUNCTION__, (int) (addr & 0xfff));
+ __func__, (int) (addr & 0xfff));
return;
}
}
s->dev_config = value;
s->host_mode = (value & TUSB_DEV_CONF_USB_HOST_MODE);
if (value & TUSB_DEV_CONF_PROD_TEST_MODE)
- hw_error("%s: Product Test mode not allowed\n", __FUNCTION__);
+ hw_error("%s: Product Test mode not allowed\n", __func__);
break;
case TUSB_PHY_OTG_CTRL_ENABLE:
break;
default:
- printf("%s: unknown register at %03x\n", __FUNCTION__, offset);
+ printf("%s: unknown register at %03x\n", __func__, offset);
return;
}
}
int i;
if (!xs_mkdir(xenstore, 0, path)) {
- fprintf(stderr, "%s: xs_mkdir %s: failed\n", __FUNCTION__, path);
+ fprintf(stderr, "%s: xs_mkdir %s: failed\n", __func__, path);
return -1;
}
if (!xs_set_permissions(xenstore, 0, path, perms_ro, 2)) {
- fprintf(stderr, "%s: xs_set_permissions failed\n", __FUNCTION__);
+ fprintf(stderr, "%s: xs_set_permissions failed\n", __func__);
return -1;
}
for (i = 0; writable[i]; i++) {
snprintf(subpath, sizeof(subpath), "%s/%s", path, writable[i]);
if (!xs_mkdir(xenstore, 0, subpath)) {
- fprintf(stderr, "%s: xs_mkdir %s: failed\n", __FUNCTION__, subpath);
+ fprintf(stderr, "%s: xs_mkdir %s: failed\n", __func__, subpath);
return -1;
}
if (!xs_set_permissions(xenstore, 0, subpath, perms_rw, 2)) {
- fprintf(stderr, "%s: xs_set_permissions failed\n", __FUNCTION__);
+ fprintf(stderr, "%s: xs_set_permissions failed\n", __func__);
return -1;
}
}
char byte;
if (pipe(fd) != 0) {
- qemu_log("%s: Huh? pipe error: %s\n", __FUNCTION__, strerror(errno));
+ qemu_log("%s: Huh? pipe error: %s\n", __func__, strerror(errno));
return -1;
}
if (fork() != 0)
case -1:
if (errno == EINTR)
continue;
- qemu_log("%s: Huh? read error: %s\n", __FUNCTION__, strerror(errno));
+ qemu_log("%s: Huh? read error: %s\n", __func__, strerror(errno));
qemu_running = 0;
break;
case 0:
qemu_running = 0;
break;
default:
- qemu_log("%s: Huh? data on the watch pipe?\n", __FUNCTION__);
+ qemu_log("%s: Huh? data on the watch pipe?\n", __func__);
break;
}
}
/* cleanup */
- qemu_log("%s: destroy domain %d\n", __FUNCTION__, xen_domid);
+ qemu_log("%s: destroy domain %d\n", __func__, xen_domid);
xc_domain_destroy(xen_xc, xen_domid);
_exit(0);
}
/* Initialize backend core & drivers */
if (xen_be_init() != 0) {
- fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__);
+ fprintf(stderr, "%s: xen backend core setup failed\n", __func__);
exit(1);
}
# define OMAP_BAD_REG(paddr) \
fprintf(stderr, "%s: Bad register " OMAP_FMT_plx "\n", \
- __FUNCTION__, paddr)
+ __func__, paddr)
# define OMAP_RO_REG(paddr) \
fprintf(stderr, "%s: Read-only register " OMAP_FMT_plx "\n", \
- __FUNCTION__, paddr)
+ __func__, paddr)
/* OMAP-specific Linux bootloader tags for the ATAG_BOARD area
(Board-specifc tags are not here) */
# ifdef TCMI_VERBOSE
# define OMAP_8B_REG(paddr) \
fprintf(stderr, "%s: 8-bit register " OMAP_FMT_plx "\n", \
- __FUNCTION__, paddr)
+ __func__, paddr)
# define OMAP_16B_REG(paddr) \
fprintf(stderr, "%s: 16-bit register " OMAP_FMT_plx "\n", \
- __FUNCTION__, paddr)
+ __func__, paddr)
# define OMAP_32B_REG(paddr) \
fprintf(stderr, "%s: 32-bit register " OMAP_FMT_plx "\n", \
- __FUNCTION__, paddr)
+ __func__, paddr)
# else
# define OMAP_8B_REG(paddr)
# define OMAP_16B_REG(paddr)
#define QEMU_SHARPSL_H
#define zaurus_printf(format, ...) \
- fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__)
+ fprintf(stderr, "%s: " format, __func__, ##__VA_ARGS__)
/* zaurus.c */
#ifdef DEBUG_GUEST_PHYS_REGION_ADD
fprintf(stderr, "%s: target_start=" TARGET_FMT_plx " target_end="
- TARGET_FMT_plx ": %s (count: %u)\n", __FUNCTION__, target_start,
+ TARGET_FMT_plx ": %s (count: %u)\n", __func__, target_start,
target_end, predecessor ? "joined" : "added", g->list->num);
#endif
}
int ret = 0;
DPRINTF("%s Enter submitted %d read_done %d transferred %d\n",
- __FUNCTION__, block_mig_state.submitted, block_mig_state.read_done,
+ __func__, block_mig_state.submitted, block_mig_state.read_done,
block_mig_state.transferred);
blk_mig_lock();
}
blk_mig_unlock();
- DPRINTF("%s Exit submitted %d read_done %d transferred %d\n", __FUNCTION__,
+ DPRINTF("%s Exit submitted %d read_done %d transferred %d\n", __func__,
block_mig_state.submitted, block_mig_state.read_done,
block_mig_state.transferred);
return ret;
if (sscanf(xpm[line], "%u %u %u %u",
&width, &height, &colors, &chars) != 4) {
fprintf(stderr, "%s: header parse error: \"%s\"\n",
- __FUNCTION__, xpm[line]);
+ __func__, xpm[line]);
return NULL;
}
if (chars != 1) {
- fprintf(stderr, "%s: chars != 1 not supported\n", __FUNCTION__);
+ fprintf(stderr, "%s: chars != 1 not supported\n", __func__);
return NULL;
}
line++;
}
}
fprintf(stderr, "%s: color parse error: \"%s\"\n",
- __FUNCTION__, xpm[line]);
+ __func__, xpm[line]);
return NULL;
}
static void interface_notify_update(QXLInstance *sin, uint32_t update_id)
{
- fprintf(stderr, "%s: abort()\n", __FUNCTION__);
+ fprintf(stderr, "%s: abort()\n", __func__);
abort();
}
static int interface_flush_resources(QXLInstance *sin)
{
- fprintf(stderr, "%s: abort()\n", __FUNCTION__);
+ fprintf(stderr, "%s: abort()\n", __func__);
abort();
return 0;
}