kcs_bmc 48 drivers/char/ipmi/kcs_bmc.c static inline u8 read_data(struct kcs_bmc *kcs_bmc) kcs_bmc 50 drivers/char/ipmi/kcs_bmc.c return kcs_bmc->io_inputb(kcs_bmc, kcs_bmc->ioreg.idr); kcs_bmc 53 drivers/char/ipmi/kcs_bmc.c static inline void write_data(struct kcs_bmc *kcs_bmc, u8 data) kcs_bmc 55 drivers/char/ipmi/kcs_bmc.c kcs_bmc->io_outputb(kcs_bmc, kcs_bmc->ioreg.odr, data); kcs_bmc 58 drivers/char/ipmi/kcs_bmc.c static inline u8 read_status(struct kcs_bmc *kcs_bmc) kcs_bmc 60 drivers/char/ipmi/kcs_bmc.c return kcs_bmc->io_inputb(kcs_bmc, kcs_bmc->ioreg.str); kcs_bmc 63 drivers/char/ipmi/kcs_bmc.c static inline void write_status(struct kcs_bmc *kcs_bmc, u8 data) kcs_bmc 65 drivers/char/ipmi/kcs_bmc.c kcs_bmc->io_outputb(kcs_bmc, kcs_bmc->ioreg.str, data); kcs_bmc 68 drivers/char/ipmi/kcs_bmc.c static void update_status_bits(struct kcs_bmc *kcs_bmc, u8 mask, u8 val) kcs_bmc 70 drivers/char/ipmi/kcs_bmc.c u8 tmp = read_status(kcs_bmc); kcs_bmc 75 drivers/char/ipmi/kcs_bmc.c write_status(kcs_bmc, tmp); kcs_bmc 78 drivers/char/ipmi/kcs_bmc.c static inline void set_state(struct kcs_bmc *kcs_bmc, u8 state) kcs_bmc 80 drivers/char/ipmi/kcs_bmc.c update_status_bits(kcs_bmc, KCS_STATUS_STATE_MASK, kcs_bmc 84 drivers/char/ipmi/kcs_bmc.c static void kcs_force_abort(struct kcs_bmc *kcs_bmc) kcs_bmc 86 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, ERROR_STATE); kcs_bmc 87 drivers/char/ipmi/kcs_bmc.c read_data(kcs_bmc); kcs_bmc 88 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 90 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_ERROR; kcs_bmc 91 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail = false; kcs_bmc 92 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_idx = 0; kcs_bmc 95 drivers/char/ipmi/kcs_bmc.c static void kcs_bmc_handle_data(struct kcs_bmc *kcs_bmc) kcs_bmc 99 drivers/char/ipmi/kcs_bmc.c switch (kcs_bmc->phase) { kcs_bmc 101 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_WRITE_DATA; kcs_bmc 105 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->data_in_idx < KCS_MSG_BUFSIZ) { kcs_bmc 106 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, WRITE_STATE); kcs_bmc 107 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 108 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in[kcs_bmc->data_in_idx++] = kcs_bmc 109 drivers/char/ipmi/kcs_bmc.c read_data(kcs_bmc); kcs_bmc 111 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 112 drivers/char/ipmi/kcs_bmc.c kcs_bmc->error = KCS_LENGTH_ERROR; kcs_bmc 117 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->data_in_idx < KCS_MSG_BUFSIZ) { kcs_bmc 118 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, READ_STATE); kcs_bmc 119 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in[kcs_bmc->data_in_idx++] = kcs_bmc 120 drivers/char/ipmi/kcs_bmc.c read_data(kcs_bmc); kcs_bmc 121 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_WRITE_DONE; kcs_bmc 122 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail = true; kcs_bmc 123 drivers/char/ipmi/kcs_bmc.c wake_up_interruptible(&kcs_bmc->queue); kcs_bmc 125 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 126 drivers/char/ipmi/kcs_bmc.c kcs_bmc->error = KCS_LENGTH_ERROR; kcs_bmc 131 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->data_out_idx == kcs_bmc->data_out_len) kcs_bmc 132 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, IDLE_STATE); kcs_bmc 134 drivers/char/ipmi/kcs_bmc.c data = read_data(kcs_bmc); kcs_bmc 136 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, ERROR_STATE); kcs_bmc 137 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 141 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->data_out_idx == kcs_bmc->data_out_len) { kcs_bmc 142 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 143 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_IDLE; kcs_bmc 147 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, kcs_bmc 148 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_out[kcs_bmc->data_out_idx++]); kcs_bmc 152 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, READ_STATE); kcs_bmc 153 drivers/char/ipmi/kcs_bmc.c read_data(kcs_bmc); kcs_bmc 154 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, kcs_bmc->error); kcs_bmc 155 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_ABORT_ERROR2; kcs_bmc 159 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, IDLE_STATE); kcs_bmc 160 drivers/char/ipmi/kcs_bmc.c read_data(kcs_bmc); kcs_bmc 161 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 162 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_IDLE; kcs_bmc 166 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 171 drivers/char/ipmi/kcs_bmc.c static void kcs_bmc_handle_cmd(struct kcs_bmc *kcs_bmc) kcs_bmc 175 drivers/char/ipmi/kcs_bmc.c set_state(kcs_bmc, WRITE_STATE); kcs_bmc 176 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, KCS_ZERO_DATA); kcs_bmc 178 drivers/char/ipmi/kcs_bmc.c cmd = read_data(kcs_bmc); kcs_bmc 181 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_WRITE_START; kcs_bmc 182 drivers/char/ipmi/kcs_bmc.c kcs_bmc->error = KCS_NO_ERROR; kcs_bmc 183 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail = false; kcs_bmc 184 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_idx = 0; kcs_bmc 188 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->phase != KCS_PHASE_WRITE_DATA) { kcs_bmc 189 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 193 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_WRITE_END_CMD; kcs_bmc 197 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->error == KCS_NO_ERROR) kcs_bmc 198 drivers/char/ipmi/kcs_bmc.c kcs_bmc->error = KCS_ABORTED_BY_COMMAND; kcs_bmc 200 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_ABORT_ERROR1; kcs_bmc 201 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail = false; kcs_bmc 202 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_idx = 0; kcs_bmc 206 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 207 drivers/char/ipmi/kcs_bmc.c kcs_bmc->error = KCS_ILLEGAL_CONTROL_CODE; kcs_bmc 212 drivers/char/ipmi/kcs_bmc.c int kcs_bmc_handle_event(struct kcs_bmc *kcs_bmc) kcs_bmc 218 drivers/char/ipmi/kcs_bmc.c spin_lock_irqsave(&kcs_bmc->lock, flags); kcs_bmc 220 drivers/char/ipmi/kcs_bmc.c status = read_status(kcs_bmc); kcs_bmc 222 drivers/char/ipmi/kcs_bmc.c if (!kcs_bmc->running) kcs_bmc 223 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 225 drivers/char/ipmi/kcs_bmc.c kcs_bmc_handle_cmd(kcs_bmc); kcs_bmc 227 drivers/char/ipmi/kcs_bmc.c kcs_bmc_handle_data(kcs_bmc); kcs_bmc 232 drivers/char/ipmi/kcs_bmc.c spin_unlock_irqrestore(&kcs_bmc->lock, flags); kcs_bmc 238 drivers/char/ipmi/kcs_bmc.c static inline struct kcs_bmc *to_kcs_bmc(struct file *filp) kcs_bmc 240 drivers/char/ipmi/kcs_bmc.c return container_of(filp->private_data, struct kcs_bmc, miscdev); kcs_bmc 245 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 248 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 249 drivers/char/ipmi/kcs_bmc.c if (!kcs_bmc->running) kcs_bmc 250 drivers/char/ipmi/kcs_bmc.c kcs_bmc->running = 1; kcs_bmc 253 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 260 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 263 drivers/char/ipmi/kcs_bmc.c poll_wait(filp, &kcs_bmc->queue, wait); kcs_bmc 265 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 266 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->data_in_avail) kcs_bmc 268 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 276 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 282 drivers/char/ipmi/kcs_bmc.c wait_event_interruptible(kcs_bmc->queue, kcs_bmc 283 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail); kcs_bmc 285 drivers/char/ipmi/kcs_bmc.c mutex_lock(&kcs_bmc->mutex); kcs_bmc 287 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 288 drivers/char/ipmi/kcs_bmc.c data_avail = kcs_bmc->data_in_avail; kcs_bmc 290 drivers/char/ipmi/kcs_bmc.c data_len = kcs_bmc->data_in_idx; kcs_bmc 291 drivers/char/ipmi/kcs_bmc.c memcpy(kcs_bmc->kbuffer, kcs_bmc->data_in, data_len); kcs_bmc 293 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 302 drivers/char/ipmi/kcs_bmc.c kcs_bmc->channel, data_len); kcs_bmc 304 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 305 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 306 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 312 drivers/char/ipmi/kcs_bmc.c if (copy_to_user(buf, kcs_bmc->kbuffer, data_len)) { kcs_bmc 319 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 320 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->phase == KCS_PHASE_WRITE_DONE) { kcs_bmc 321 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_WAIT_READ; kcs_bmc 322 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_avail = false; kcs_bmc 323 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in_idx = 0; kcs_bmc 327 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 330 drivers/char/ipmi/kcs_bmc.c mutex_unlock(&kcs_bmc->mutex); kcs_bmc 338 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 345 drivers/char/ipmi/kcs_bmc.c mutex_lock(&kcs_bmc->mutex); kcs_bmc 347 drivers/char/ipmi/kcs_bmc.c if (copy_from_user(kcs_bmc->kbuffer, buf, count)) { kcs_bmc 352 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 353 drivers/char/ipmi/kcs_bmc.c if (kcs_bmc->phase == KCS_PHASE_WAIT_READ) { kcs_bmc 354 drivers/char/ipmi/kcs_bmc.c kcs_bmc->phase = KCS_PHASE_READ; kcs_bmc 355 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_out_idx = 1; kcs_bmc 356 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_out_len = count; kcs_bmc 357 drivers/char/ipmi/kcs_bmc.c memcpy(kcs_bmc->data_out, kcs_bmc->kbuffer, count); kcs_bmc 358 drivers/char/ipmi/kcs_bmc.c write_data(kcs_bmc, kcs_bmc->data_out[0]); kcs_bmc 363 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 366 drivers/char/ipmi/kcs_bmc.c mutex_unlock(&kcs_bmc->mutex); kcs_bmc 374 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 377 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 381 drivers/char/ipmi/kcs_bmc.c update_status_bits(kcs_bmc, KCS_STATUS_SMS_ATN, kcs_bmc 386 drivers/char/ipmi/kcs_bmc.c update_status_bits(kcs_bmc, KCS_STATUS_SMS_ATN, kcs_bmc 391 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 399 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 406 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc = to_kcs_bmc(filp); kcs_bmc 408 drivers/char/ipmi/kcs_bmc.c spin_lock_irq(&kcs_bmc->lock); kcs_bmc 409 drivers/char/ipmi/kcs_bmc.c kcs_bmc->running = 0; kcs_bmc 410 drivers/char/ipmi/kcs_bmc.c kcs_force_abort(kcs_bmc); kcs_bmc 411 drivers/char/ipmi/kcs_bmc.c spin_unlock_irq(&kcs_bmc->lock); kcs_bmc 426 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc_alloc(struct device *dev, int sizeof_priv, u32 channel) kcs_bmc 428 drivers/char/ipmi/kcs_bmc.c struct kcs_bmc *kcs_bmc; kcs_bmc 430 drivers/char/ipmi/kcs_bmc.c kcs_bmc = devm_kzalloc(dev, sizeof(*kcs_bmc) + sizeof_priv, GFP_KERNEL); kcs_bmc 431 drivers/char/ipmi/kcs_bmc.c if (!kcs_bmc) kcs_bmc 434 drivers/char/ipmi/kcs_bmc.c spin_lock_init(&kcs_bmc->lock); kcs_bmc 435 drivers/char/ipmi/kcs_bmc.c kcs_bmc->channel = channel; kcs_bmc 437 drivers/char/ipmi/kcs_bmc.c mutex_init(&kcs_bmc->mutex); kcs_bmc 438 drivers/char/ipmi/kcs_bmc.c init_waitqueue_head(&kcs_bmc->queue); kcs_bmc 440 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_in = devm_kmalloc(dev, KCS_MSG_BUFSIZ, GFP_KERNEL); kcs_bmc 441 drivers/char/ipmi/kcs_bmc.c kcs_bmc->data_out = devm_kmalloc(dev, KCS_MSG_BUFSIZ, GFP_KERNEL); kcs_bmc 442 drivers/char/ipmi/kcs_bmc.c kcs_bmc->kbuffer = devm_kmalloc(dev, KCS_MSG_BUFSIZ, GFP_KERNEL); kcs_bmc 444 drivers/char/ipmi/kcs_bmc.c kcs_bmc->miscdev.minor = MISC_DYNAMIC_MINOR; kcs_bmc 445 drivers/char/ipmi/kcs_bmc.c kcs_bmc->miscdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s%u", kcs_bmc 447 drivers/char/ipmi/kcs_bmc.c if (!kcs_bmc->data_in || !kcs_bmc->data_out || !kcs_bmc->kbuffer || kcs_bmc 448 drivers/char/ipmi/kcs_bmc.c !kcs_bmc->miscdev.name) kcs_bmc 450 drivers/char/ipmi/kcs_bmc.c kcs_bmc->miscdev.fops = &kcs_bmc_fops; kcs_bmc 452 drivers/char/ipmi/kcs_bmc.c return kcs_bmc; kcs_bmc 77 drivers/char/ipmi/kcs_bmc.h u8 (*io_inputb)(struct kcs_bmc *kcs_bmc, u32 reg); kcs_bmc 78 drivers/char/ipmi/kcs_bmc.h void (*io_outputb)(struct kcs_bmc *kcs_bmc, u32 reg, u8 b); kcs_bmc 100 drivers/char/ipmi/kcs_bmc.h static inline void *kcs_bmc_priv(struct kcs_bmc *kcs_bmc) kcs_bmc 102 drivers/char/ipmi/kcs_bmc.h return kcs_bmc->priv; kcs_bmc 105 drivers/char/ipmi/kcs_bmc.h int kcs_bmc_handle_event(struct kcs_bmc *kcs_bmc); kcs_bmc 106 drivers/char/ipmi/kcs_bmc.h struct kcs_bmc *kcs_bmc_alloc(struct device *dev, int sizeof_priv, kcs_bmc 69 drivers/char/ipmi/kcs_bmc_aspeed.c static u8 aspeed_kcs_inb(struct kcs_bmc *kcs_bmc, u32 reg) kcs_bmc 71 drivers/char/ipmi/kcs_bmc_aspeed.c struct aspeed_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 81 drivers/char/ipmi/kcs_bmc_aspeed.c static void aspeed_kcs_outb(struct kcs_bmc *kcs_bmc, u32 reg, u8 data) kcs_bmc 83 drivers/char/ipmi/kcs_bmc_aspeed.c struct aspeed_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 104 drivers/char/ipmi/kcs_bmc_aspeed.c static void aspeed_kcs_set_address(struct kcs_bmc *kcs_bmc, u16 addr) kcs_bmc 106 drivers/char/ipmi/kcs_bmc_aspeed.c struct aspeed_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 108 drivers/char/ipmi/kcs_bmc_aspeed.c switch (kcs_bmc->channel) { kcs_bmc 138 drivers/char/ipmi/kcs_bmc_aspeed.c static void aspeed_kcs_enable_channel(struct kcs_bmc *kcs_bmc, bool enable) kcs_bmc 140 drivers/char/ipmi/kcs_bmc_aspeed.c struct aspeed_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 142 drivers/char/ipmi/kcs_bmc_aspeed.c switch (kcs_bmc->channel) { kcs_bmc 207 drivers/char/ipmi/kcs_bmc_aspeed.c struct kcs_bmc *kcs_bmc = arg; kcs_bmc 209 drivers/char/ipmi/kcs_bmc_aspeed.c if (!kcs_bmc_handle_event(kcs_bmc)) kcs_bmc 215 drivers/char/ipmi/kcs_bmc_aspeed.c static int aspeed_kcs_config_irq(struct kcs_bmc *kcs_bmc, kcs_bmc 226 drivers/char/ipmi/kcs_bmc_aspeed.c dev_name(dev), kcs_bmc); kcs_bmc 240 drivers/char/ipmi/kcs_bmc_aspeed.c struct kcs_bmc *kcs_bmc; kcs_bmc 256 drivers/char/ipmi/kcs_bmc_aspeed.c kcs_bmc = kcs_bmc_alloc(dev, sizeof(*priv), chan); kcs_bmc 257 drivers/char/ipmi/kcs_bmc_aspeed.c if (!kcs_bmc) kcs_bmc 260 drivers/char/ipmi/kcs_bmc_aspeed.c priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 267 drivers/char/ipmi/kcs_bmc_aspeed.c kcs_bmc->ioreg = ast_kcs_bmc_ioregs[chan - 1]; kcs_bmc 268 drivers/char/ipmi/kcs_bmc_aspeed.c kcs_bmc->io_inputb = aspeed_kcs_inb; kcs_bmc 269 drivers/char/ipmi/kcs_bmc_aspeed.c kcs_bmc->io_outputb = aspeed_kcs_outb; kcs_bmc 271 drivers/char/ipmi/kcs_bmc_aspeed.c dev_set_drvdata(dev, kcs_bmc); kcs_bmc 273 drivers/char/ipmi/kcs_bmc_aspeed.c aspeed_kcs_set_address(kcs_bmc, addr); kcs_bmc 274 drivers/char/ipmi/kcs_bmc_aspeed.c aspeed_kcs_enable_channel(kcs_bmc, true); kcs_bmc 275 drivers/char/ipmi/kcs_bmc_aspeed.c rc = aspeed_kcs_config_irq(kcs_bmc, pdev); kcs_bmc 279 drivers/char/ipmi/kcs_bmc_aspeed.c rc = misc_register(&kcs_bmc->miscdev); kcs_bmc 287 drivers/char/ipmi/kcs_bmc_aspeed.c kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, kcs_bmc->ioreg.str); kcs_bmc 294 drivers/char/ipmi/kcs_bmc_aspeed.c struct kcs_bmc *kcs_bmc = dev_get_drvdata(&pdev->dev); kcs_bmc 296 drivers/char/ipmi/kcs_bmc_aspeed.c misc_deregister(&kcs_bmc->miscdev); kcs_bmc 79 drivers/char/ipmi/kcs_bmc_npcm7xx.c static u8 npcm7xx_kcs_inb(struct kcs_bmc *kcs_bmc, u32 reg) kcs_bmc 81 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct npcm7xx_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 91 drivers/char/ipmi/kcs_bmc_npcm7xx.c static void npcm7xx_kcs_outb(struct kcs_bmc *kcs_bmc, u32 reg, u8 data) kcs_bmc 93 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct npcm7xx_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 100 drivers/char/ipmi/kcs_bmc_npcm7xx.c static void npcm7xx_kcs_enable_channel(struct kcs_bmc *kcs_bmc, bool enable) kcs_bmc 102 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct npcm7xx_kcs_bmc *priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 113 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct kcs_bmc *kcs_bmc = arg; kcs_bmc 115 drivers/char/ipmi/kcs_bmc_npcm7xx.c if (!kcs_bmc_handle_event(kcs_bmc)) kcs_bmc 121 drivers/char/ipmi/kcs_bmc_npcm7xx.c static int npcm7xx_kcs_config_irq(struct kcs_bmc *kcs_bmc, kcs_bmc 132 drivers/char/ipmi/kcs_bmc_npcm7xx.c dev_name(dev), kcs_bmc); kcs_bmc 139 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct kcs_bmc *kcs_bmc; kcs_bmc 149 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc = kcs_bmc_alloc(dev, sizeof(*priv), chan); kcs_bmc 150 drivers/char/ipmi/kcs_bmc_npcm7xx.c if (!kcs_bmc) kcs_bmc 153 drivers/char/ipmi/kcs_bmc_npcm7xx.c priv = kcs_bmc_priv(kcs_bmc); kcs_bmc 161 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->ioreg.idr = priv->reg->dib; kcs_bmc 162 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->ioreg.odr = priv->reg->dob; kcs_bmc 163 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->ioreg.str = priv->reg->sts; kcs_bmc 164 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->io_inputb = npcm7xx_kcs_inb; kcs_bmc 165 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->io_outputb = npcm7xx_kcs_outb; kcs_bmc 167 drivers/char/ipmi/kcs_bmc_npcm7xx.c dev_set_drvdata(dev, kcs_bmc); kcs_bmc 169 drivers/char/ipmi/kcs_bmc_npcm7xx.c npcm7xx_kcs_enable_channel(kcs_bmc, true); kcs_bmc 170 drivers/char/ipmi/kcs_bmc_npcm7xx.c rc = npcm7xx_kcs_config_irq(kcs_bmc, pdev); kcs_bmc 174 drivers/char/ipmi/kcs_bmc_npcm7xx.c rc = misc_register(&kcs_bmc->miscdev); kcs_bmc 182 drivers/char/ipmi/kcs_bmc_npcm7xx.c kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, kcs_bmc->ioreg.str); kcs_bmc 189 drivers/char/ipmi/kcs_bmc_npcm7xx.c struct kcs_bmc *kcs_bmc = dev_get_drvdata(&pdev->dev); kcs_bmc 191 drivers/char/ipmi/kcs_bmc_npcm7xx.c misc_deregister(&kcs_bmc->miscdev);