tpm_nsc.c (db8c246937713e60b7628661ccc187eeb81f2bae) tpm_nsc.c (1f866057291fc00f14e4962473bd7724ffa8f578)
1/*
2 * Copyright (C) 2004 IBM Corporation
3 *
4 * Authors:
5 * Leendert van Doorn <leendert@watson.ibm.com>
6 * Dave Safford <safford@watson.ibm.com>
7 * Reiner Sailer <sailer@watson.ibm.com>
8 * Kylene Hall <kjhall@us.ibm.com>

--- 213 unchanged lines hidden (view full) ---

222 outb(NSC_COMMAND_CANCEL, chip->vendor.base + NSC_COMMAND);
223}
224
225static u8 tpm_nsc_status(struct tpm_chip *chip)
226{
227 return inb(chip->vendor.base + NSC_STATUS);
228}
229
1/*
2 * Copyright (C) 2004 IBM Corporation
3 *
4 * Authors:
5 * Leendert van Doorn <leendert@watson.ibm.com>
6 * Dave Safford <safford@watson.ibm.com>
7 * Reiner Sailer <sailer@watson.ibm.com>
8 * Kylene Hall <kjhall@us.ibm.com>

--- 213 unchanged lines hidden (view full) ---

222 outb(NSC_COMMAND_CANCEL, chip->vendor.base + NSC_COMMAND);
223}
224
225static u8 tpm_nsc_status(struct tpm_chip *chip)
226{
227 return inb(chip->vendor.base + NSC_STATUS);
228}
229
230static bool tpm_nsc_req_canceled(struct tpm_chip *chip, u8 status)
231{
232 return (status == NSC_STATUS_RDY);
233}
234
230static const struct file_operations nsc_ops = {
231 .owner = THIS_MODULE,
232 .llseek = no_llseek,
233 .open = tpm_open,
234 .read = tpm_read,
235 .write = tpm_write,
236 .release = tpm_release,
237};

--- 15 unchanged lines hidden (view full) ---

253
254static const struct tpm_vendor_specific tpm_nsc = {
255 .recv = tpm_nsc_recv,
256 .send = tpm_nsc_send,
257 .cancel = tpm_nsc_cancel,
258 .status = tpm_nsc_status,
259 .req_complete_mask = NSC_STATUS_OBF,
260 .req_complete_val = NSC_STATUS_OBF,
235static const struct file_operations nsc_ops = {
236 .owner = THIS_MODULE,
237 .llseek = no_llseek,
238 .open = tpm_open,
239 .read = tpm_read,
240 .write = tpm_write,
241 .release = tpm_release,
242};

--- 15 unchanged lines hidden (view full) ---

258
259static const struct tpm_vendor_specific tpm_nsc = {
260 .recv = tpm_nsc_recv,
261 .send = tpm_nsc_send,
262 .cancel = tpm_nsc_cancel,
263 .status = tpm_nsc_status,
264 .req_complete_mask = NSC_STATUS_OBF,
265 .req_complete_val = NSC_STATUS_OBF,
261 .req_canceled = NSC_STATUS_RDY,
266 .req_canceled = tpm_nsc_req_canceled,
262 .attr_group = &nsc_attr_grp,
263 .miscdev = { .fops = &nsc_ops, },
264};
265
266static struct platform_device *pdev = NULL;
267
268static void tpm_nsc_remove(struct device *dev)
269{

--- 132 unchanged lines hidden ---
267 .attr_group = &nsc_attr_grp,
268 .miscdev = { .fops = &nsc_ops, },
269};
270
271static struct platform_device *pdev = NULL;
272
273static void tpm_nsc_remove(struct device *dev)
274{

--- 132 unchanged lines hidden ---