Commit 0dd12c44 authored by Mark Allyn's avatar Mark Allyn Committed by Greg Kroah-Hartman

Staging: sep: remove code for Moorestown device

The Moorestown (older device) will be added to driver
later.
Signed-off-by: default avatarMark Allyn <mark.a.allyn@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 08740c97
...@@ -940,9 +940,7 @@ static int sep_send_command_handler(struct sep_device *sep) ...@@ -940,9 +940,7 @@ static int sep_send_command_handler(struct sep_device *sep)
} }
sep_set_time(sep); sep_set_time(sep);
/* Only Medfield has caller id */ sep_set_current_caller_id(sep);
if (sep->mrst == 0)
sep_set_current_caller_id(sep);
sep_dump_message(sep); sep_dump_message(sep);
...@@ -3057,8 +3055,6 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -3057,8 +3055,6 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
error = sep_end_transaction_handler(sep); error = sep_end_transaction_handler(sep);
break; break;
case SEP_IOCREALLOCEXTCACHE: case SEP_IOCREALLOCEXTCACHE:
if (sep->mrst)
error = -ENODEV;
if (sep->pdev->revision == 0) /* Only for old chip */ if (sep->pdev->revision == 0) /* Only for old chip */
error = sep_realloc_ext_cache_handler(sep, arg); error = sep_realloc_ext_cache_handler(sep, arg);
else else
...@@ -3237,55 +3233,6 @@ static irqreturn_t sep_inthandler(int irq, void *dev_id) ...@@ -3237,55 +3233,6 @@ static irqreturn_t sep_inthandler(int irq, void *dev_id)
return int_error; return int_error;
} }
/**
* sep_callback - RAR callback
* @sep_context_pointer: pointer to struct sep_device
*
* Function that is called by rar_register when it is ready with
* a region (only for Moorestown)
*/
static int sep_callback(unsigned long sep_context_pointer)
{
int error;
struct sep_device *sep = (struct sep_device *)sep_context_pointer;
dma_addr_t rar_end_address;
dev_dbg(&sep->pdev->dev, "callback start\n");
error = rar_get_address(RAR_TYPE_IMAGE, &sep->rar_bus,
&rar_end_address);
if (error) {
dev_warn(&sep->pdev->dev, "mrst can't get rar region\n");
goto end_function;
}
sep->rar_size = (size_t)(rar_end_address - sep->rar_bus + 1);
if (!request_mem_region(sep->rar_bus, sep->rar_size,
"sep_sec_driver")) {
dev_warn(&sep->pdev->dev,
"request mem region for mrst failed\n");
error = -1;
goto end_function;
}
sep->rar_addr = ioremap_nocache(sep->rar_bus, sep->rar_size);
if (!sep->rar_addr) {
dev_warn(&sep->pdev->dev,
"ioremap nocache for mrst rar failed\n");
error = -ENOMEM;
goto end_function;
}
dev_dbg(&sep->pdev->dev, "rar start is %p, phy is %llx, size is %zx\n",
sep->rar_addr, (unsigned long long)sep->rar_bus,
sep->rar_size);
end_function:
dev_dbg(&sep->pdev->dev, "callback end\n");
return error;
}
/** /**
* sep_reconfig_shared_area - reconfigure shared area * sep_reconfig_shared_area - reconfigure shared area
* @sep: pointer to struct sep_device * @sep: pointer to struct sep_device
...@@ -3390,16 +3337,14 @@ static int sep_register_driver_with_fs(struct sep_device *sep) ...@@ -3390,16 +3337,14 @@ static int sep_register_driver_with_fs(struct sep_device *sep)
return ret_val; return ret_val;
} }
if (!sep->mrst) { ret_val = misc_register(&sep->miscdev_daemon);
ret_val = misc_register(&sep->miscdev_daemon); if (ret_val) {
if (ret_val) { dev_warn(&sep->pdev->dev, "misc reg fails for dmn %x\n",
dev_warn(&sep->pdev->dev, "misc reg fails for dmn %x\n", ret_val);
ret_val); misc_deregister(&sep->miscdev_sep);
misc_deregister(&sep->miscdev_sep); misc_deregister(&sep->miscdev_singleton);
misc_deregister(&sep->miscdev_singleton);
return ret_val; return ret_val;
}
} }
return ret_val; return ret_val;
} }
...@@ -3457,9 +3402,6 @@ static int __devinit sep_probe(struct pci_dev *pdev, ...@@ -3457,9 +3402,6 @@ static int __devinit sep_probe(struct pci_dev *pdev,
mutex_init(&sep->sep_mutex); mutex_init(&sep->sep_mutex);
mutex_init(&sep->ioctl_mutex); mutex_init(&sep->ioctl_mutex);
if (pdev->device == MRST_PCI_DEVICE_ID)
sep->mrst = 1;
dev_dbg(&sep->pdev->dev, "PCI obtained, device being prepared\n"); dev_dbg(&sep->pdev->dev, "PCI obtained, device being prepared\n");
dev_dbg(&sep->pdev->dev, "revision is %d\n", sep->pdev->revision); dev_dbg(&sep->pdev->dev, "revision is %d\n", sep->pdev->revision);
...@@ -3505,31 +3447,20 @@ static int __devinit sep_probe(struct pci_dev *pdev, ...@@ -3505,31 +3447,20 @@ static int __devinit sep_probe(struct pci_dev *pdev,
goto end_function_error; goto end_function_error;
} }
/* The next section depends on type of unit */ sep->rar_size = FAKE_RAR_SIZE;
if (sep->mrst) { sep->rar_addr = dma_alloc_coherent(NULL,
error = register_rar(RAR_TYPE_IMAGE, &sep_callback, sep->rar_size, &sep->rar_bus, GFP_KERNEL);
(unsigned long)sep); if (sep->rar_addr == NULL) {
if (error) { dev_warn(&sep->pdev->dev, "can't allocate mfld rar\n");
dev_dbg(&sep->pdev->dev, error = -ENOMEM;
"error register_rar\n"); goto end_function_deallocate_sep_shared_area;
goto end_function_deallocate_sep_shared_area;
}
} else {
sep->rar_size = FAKE_RAR_SIZE;
sep->rar_addr = dma_alloc_coherent(NULL,
sep->rar_size, &sep->rar_bus, GFP_KERNEL);
if (sep->rar_addr == NULL) {
dev_warn(&sep->pdev->dev, "can't allocate mfld rar\n");
error = -ENOMEM;
goto end_function_deallocate_sep_shared_area;
}
dev_dbg(&sep->pdev->dev, "rar start is %p, phy is %llx,"
" size is %zx\n", sep->rar_addr,
(unsigned long long)sep->rar_bus,
sep->rar_size);
} }
dev_dbg(&sep->pdev->dev, "rar start is %p, phy is %llx,"
" size is %zx\n", sep->rar_addr,
(unsigned long long)sep->rar_bus,
sep->rar_size);
dev_dbg(&sep->pdev->dev, "about to write IMR and ICR REG_ADDR\n"); dev_dbg(&sep->pdev->dev, "about to write IMR and ICR REG_ADDR\n");
/* Clear ICR register */ /* Clear ICR register */
...@@ -3610,7 +3541,6 @@ static void sep_remove(struct pci_dev *pdev) ...@@ -3610,7 +3541,6 @@ static void sep_remove(struct pci_dev *pdev)
} }
static DEFINE_PCI_DEVICE_TABLE(sep_pci_id_tbl) = { static DEFINE_PCI_DEVICE_TABLE(sep_pci_id_tbl) = {
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, MRST_PCI_DEVICE_ID)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, MFLD_PCI_DEVICE_ID)}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MFLD_PCI_DEVICE_ID)},
{0} {0}
}; };
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#define SEP_DRIVER_HW_DEFS__H #define SEP_DRIVER_HW_DEFS__H
/* PCI ID's */ /* PCI ID's */
#define MRST_PCI_DEVICE_ID 0x080c
#define MFLD_PCI_DEVICE_ID 0x0826 #define MFLD_PCI_DEVICE_ID 0x0826
/*----------------------- */ /*----------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment