Path: blob/master/arch/powerpc/platforms/ps3/system-bus.c
26481 views
// SPDX-License-Identifier: GPL-2.0-only1/*2* PS3 system bus driver.3*4* Copyright (C) 2006 Sony Computer Entertainment Inc.5* Copyright 2006 Sony Corp.6*/78#include <linux/kernel.h>9#include <linux/init.h>10#include <linux/export.h>11#include <linux/dma-map-ops.h>12#include <linux/err.h>13#include <linux/slab.h>1415#include <asm/udbg.h>16#include <asm/lv1call.h>17#include <asm/firmware.h>18#include <asm/cell-regs.h>1920#include "platform.h"2122static struct device ps3_system_bus = {23.init_name = "ps3_system",24};2526/* FIXME: need device usage counters! */27static struct {28struct mutex mutex;29int sb_11; /* usb 0 */30int sb_12; /* usb 0 */31int gpu;32} usage_hack;3334static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,35u64 dev_id)36{37return dev->bus_id == bus_id && dev->dev_id == dev_id;38}3940static int ps3_open_hv_device_sb(struct ps3_system_bus_device *dev)41{42int result;4344BUG_ON(!dev->bus_id);45mutex_lock(&usage_hack.mutex);4647if (ps3_is_device(dev, 1, 1)) {48usage_hack.sb_11++;49if (usage_hack.sb_11 > 1) {50result = 0;51goto done;52}53}5455if (ps3_is_device(dev, 1, 2)) {56usage_hack.sb_12++;57if (usage_hack.sb_12 > 1) {58result = 0;59goto done;60}61}6263result = lv1_open_device(dev->bus_id, dev->dev_id, 0);6465if (result) {66pr_warn("%s:%d: lv1_open_device dev=%u.%u(%s) failed: %s\n",67__func__, __LINE__, dev->match_id, dev->match_sub_id,68dev_name(&dev->core), ps3_result(result));69result = -EPERM;70}7172done:73mutex_unlock(&usage_hack.mutex);74return result;75}7677static int ps3_close_hv_device_sb(struct ps3_system_bus_device *dev)78{79int result;8081BUG_ON(!dev->bus_id);82mutex_lock(&usage_hack.mutex);8384if (ps3_is_device(dev, 1, 1)) {85usage_hack.sb_11--;86if (usage_hack.sb_11) {87result = 0;88goto done;89}90}9192if (ps3_is_device(dev, 1, 2)) {93usage_hack.sb_12--;94if (usage_hack.sb_12) {95result = 0;96goto done;97}98}99100result = lv1_close_device(dev->bus_id, dev->dev_id);101BUG_ON(result);102103done:104mutex_unlock(&usage_hack.mutex);105return result;106}107108static int ps3_open_hv_device_gpu(struct ps3_system_bus_device *dev)109{110int result;111112mutex_lock(&usage_hack.mutex);113114usage_hack.gpu++;115if (usage_hack.gpu > 1) {116result = 0;117goto done;118}119120result = lv1_gpu_open(0);121122if (result) {123pr_warn("%s:%d: lv1_gpu_open failed: %s\n", __func__,124__LINE__, ps3_result(result));125result = -EPERM;126}127128done:129mutex_unlock(&usage_hack.mutex);130return result;131}132133static int ps3_close_hv_device_gpu(struct ps3_system_bus_device *dev)134{135int result;136137mutex_lock(&usage_hack.mutex);138139usage_hack.gpu--;140if (usage_hack.gpu) {141result = 0;142goto done;143}144145result = lv1_gpu_close();146BUG_ON(result);147148done:149mutex_unlock(&usage_hack.mutex);150return result;151}152153int ps3_open_hv_device(struct ps3_system_bus_device *dev)154{155BUG_ON(!dev);156pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);157158switch (dev->match_id) {159case PS3_MATCH_ID_EHCI:160case PS3_MATCH_ID_OHCI:161case PS3_MATCH_ID_GELIC:162case PS3_MATCH_ID_STOR_DISK:163case PS3_MATCH_ID_STOR_ROM:164case PS3_MATCH_ID_STOR_FLASH:165return ps3_open_hv_device_sb(dev);166167case PS3_MATCH_ID_SOUND:168case PS3_MATCH_ID_GPU:169return ps3_open_hv_device_gpu(dev);170171case PS3_MATCH_ID_AV_SETTINGS:172case PS3_MATCH_ID_SYSTEM_MANAGER:173pr_debug("%s:%d: unsupported match_id: %u\n", __func__,174__LINE__, dev->match_id);175pr_debug("%s:%d: bus_id: %llu\n", __func__, __LINE__,176dev->bus_id);177BUG();178return -EINVAL;179180default:181break;182}183184pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,185dev->match_id);186BUG();187return -ENODEV;188}189EXPORT_SYMBOL_GPL(ps3_open_hv_device);190191int ps3_close_hv_device(struct ps3_system_bus_device *dev)192{193BUG_ON(!dev);194pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id);195196switch (dev->match_id) {197case PS3_MATCH_ID_EHCI:198case PS3_MATCH_ID_OHCI:199case PS3_MATCH_ID_GELIC:200case PS3_MATCH_ID_STOR_DISK:201case PS3_MATCH_ID_STOR_ROM:202case PS3_MATCH_ID_STOR_FLASH:203return ps3_close_hv_device_sb(dev);204205case PS3_MATCH_ID_SOUND:206case PS3_MATCH_ID_GPU:207return ps3_close_hv_device_gpu(dev);208209case PS3_MATCH_ID_AV_SETTINGS:210case PS3_MATCH_ID_SYSTEM_MANAGER:211pr_debug("%s:%d: unsupported match_id: %u\n", __func__,212__LINE__, dev->match_id);213pr_debug("%s:%d: bus_id: %llu\n", __func__, __LINE__,214dev->bus_id);215BUG();216return -EINVAL;217218default:219break;220}221222pr_debug("%s:%d: unknown match_id: %u\n", __func__, __LINE__,223dev->match_id);224BUG();225return -ENODEV;226}227EXPORT_SYMBOL_GPL(ps3_close_hv_device);228229#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)230static void _dump_mmio_region(const struct ps3_mmio_region* r,231const char* func, int line)232{233pr_debug("%s:%d: dev %llu:%llu\n", func, line, r->dev->bus_id,234r->dev->dev_id);235pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);236pr_debug("%s:%d: len %lxh\n", func, line, r->len);237pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr);238}239240static int ps3_sb_mmio_region_create(struct ps3_mmio_region *r)241{242int result;243u64 lpar_addr;244245result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id,246r->bus_addr, r->len, r->page_size, &lpar_addr);247r->lpar_addr = lpar_addr;248249if (result) {250pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n",251__func__, __LINE__, ps3_result(result));252r->lpar_addr = 0;253}254255dump_mmio_region(r);256return result;257}258259static int ps3_ioc0_mmio_region_create(struct ps3_mmio_region *r)260{261/* device specific; do nothing currently */262return 0;263}264265int ps3_mmio_region_create(struct ps3_mmio_region *r)266{267return r->mmio_ops->create(r);268}269EXPORT_SYMBOL_GPL(ps3_mmio_region_create);270271static int ps3_sb_free_mmio_region(struct ps3_mmio_region *r)272{273int result;274275dump_mmio_region(r);276result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id,277r->lpar_addr);278279if (result)280pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n",281__func__, __LINE__, ps3_result(result));282283r->lpar_addr = 0;284return result;285}286287static int ps3_ioc0_free_mmio_region(struct ps3_mmio_region *r)288{289/* device specific; do nothing currently */290return 0;291}292293294int ps3_free_mmio_region(struct ps3_mmio_region *r)295{296return r->mmio_ops->free(r);297}298299EXPORT_SYMBOL_GPL(ps3_free_mmio_region);300301static const struct ps3_mmio_region_ops ps3_mmio_sb_region_ops = {302.create = ps3_sb_mmio_region_create,303.free = ps3_sb_free_mmio_region304};305306static const struct ps3_mmio_region_ops ps3_mmio_ioc0_region_ops = {307.create = ps3_ioc0_mmio_region_create,308.free = ps3_ioc0_free_mmio_region309};310311int ps3_mmio_region_init(struct ps3_system_bus_device *dev,312struct ps3_mmio_region *r, unsigned long bus_addr, unsigned long len,313enum ps3_mmio_page_size page_size)314{315r->dev = dev;316r->bus_addr = bus_addr;317r->len = len;318r->page_size = page_size;319switch (dev->dev_type) {320case PS3_DEVICE_TYPE_SB:321r->mmio_ops = &ps3_mmio_sb_region_ops;322break;323case PS3_DEVICE_TYPE_IOC0:324r->mmio_ops = &ps3_mmio_ioc0_region_ops;325break;326default:327BUG();328return -EINVAL;329}330return 0;331}332EXPORT_SYMBOL_GPL(ps3_mmio_region_init);333334static int ps3_system_bus_match(struct device *_dev,335const struct device_driver *_drv)336{337int result;338const struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv);339struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);340341if (!dev->match_sub_id)342result = dev->match_id == drv->match_id;343else344result = dev->match_sub_id == drv->match_sub_id &&345dev->match_id == drv->match_id;346347if (result)348pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n",349__func__, __LINE__,350dev->match_id, dev->match_sub_id, dev_name(&dev->core),351drv->match_id, drv->match_sub_id, drv->core.name);352else353pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n",354__func__, __LINE__,355dev->match_id, dev->match_sub_id, dev_name(&dev->core),356drv->match_id, drv->match_sub_id, drv->core.name);357358return result;359}360361static int ps3_system_bus_probe(struct device *_dev)362{363int result = 0;364struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);365struct ps3_system_bus_driver *drv;366367BUG_ON(!dev);368dev_dbg(_dev, "%s:%d\n", __func__, __LINE__);369370drv = ps3_system_bus_dev_to_system_bus_drv(dev);371BUG_ON(!drv);372373if (drv->probe)374result = drv->probe(dev);375else376pr_debug("%s:%d: %s no probe method\n", __func__, __LINE__,377dev_name(&dev->core));378379pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core));380return result;381}382383static void ps3_system_bus_remove(struct device *_dev)384{385struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);386struct ps3_system_bus_driver *drv;387388BUG_ON(!dev);389dev_dbg(_dev, "%s:%d\n", __func__, __LINE__);390391drv = ps3_system_bus_dev_to_system_bus_drv(dev);392BUG_ON(!drv);393394if (drv->remove)395drv->remove(dev);396else397dev_dbg(&dev->core, "%s:%d %s: no remove method\n",398__func__, __LINE__, drv->core.name);399400pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core));401}402403static void ps3_system_bus_shutdown(struct device *_dev)404{405struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);406struct ps3_system_bus_driver *drv;407408BUG_ON(!dev);409410dev_dbg(&dev->core, " -> %s:%d: match_id %d\n", __func__, __LINE__,411dev->match_id);412413if (!dev->core.driver) {414dev_dbg(&dev->core, "%s:%d: no driver bound\n", __func__,415__LINE__);416return;417}418419drv = ps3_system_bus_dev_to_system_bus_drv(dev);420421BUG_ON(!drv);422423dev_dbg(&dev->core, "%s:%d: %s -> %s\n", __func__, __LINE__,424dev_name(&dev->core), drv->core.name);425426if (drv->shutdown)427drv->shutdown(dev);428else if (drv->remove) {429dev_dbg(&dev->core, "%s:%d %s: no shutdown, calling remove\n",430__func__, __LINE__, drv->core.name);431drv->remove(dev);432} else {433dev_dbg(&dev->core, "%s:%d %s: no shutdown method\n",434__func__, __LINE__, drv->core.name);435BUG();436}437438dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);439}440441static int ps3_system_bus_uevent(const struct device *_dev, struct kobj_uevent_env *env)442{443struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);444445if (add_uevent_var(env, "MODALIAS=ps3:%d:%d", dev->match_id,446dev->match_sub_id))447return -ENOMEM;448return 0;449}450451static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,452char *buf)453{454struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);455456return sysfs_emit(buf, "ps3:%d:%d\n", dev->match_id,457dev->match_sub_id);458}459static DEVICE_ATTR_RO(modalias);460461static struct attribute *ps3_system_bus_dev_attrs[] = {462&dev_attr_modalias.attr,463NULL,464};465ATTRIBUTE_GROUPS(ps3_system_bus_dev);466467static struct bus_type ps3_system_bus_type = {468.name = "ps3_system_bus",469.match = ps3_system_bus_match,470.uevent = ps3_system_bus_uevent,471.probe = ps3_system_bus_probe,472.remove = ps3_system_bus_remove,473.shutdown = ps3_system_bus_shutdown,474.dev_groups = ps3_system_bus_dev_groups,475};476477static int __init ps3_system_bus_init(void)478{479int result;480481if (!firmware_has_feature(FW_FEATURE_PS3_LV1))482return -ENODEV;483484pr_debug(" -> %s:%d\n", __func__, __LINE__);485486mutex_init(&usage_hack.mutex);487488result = device_register(&ps3_system_bus);489BUG_ON(result);490491result = bus_register(&ps3_system_bus_type);492BUG_ON(result);493494pr_debug(" <- %s:%d\n", __func__, __LINE__);495return result;496}497498core_initcall(ps3_system_bus_init);499500/* Allocates a contiguous real buffer and creates mappings over it.501* Returns the virtual address of the buffer and sets dma_handle502* to the dma address (mapping) of the first page.503*/504static void * ps3_alloc_coherent(struct device *_dev, size_t size,505dma_addr_t *dma_handle, gfp_t flag,506unsigned long attrs)507{508int result;509struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);510unsigned long virt_addr;511512flag &= ~(__GFP_DMA | __GFP_HIGHMEM);513flag |= __GFP_ZERO;514515virt_addr = __get_free_pages(flag, get_order(size));516517if (!virt_addr) {518pr_debug("%s:%d: get_free_pages failed\n", __func__, __LINE__);519goto clean_none;520}521522result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle,523CBE_IOPTE_PP_W | CBE_IOPTE_PP_R |524CBE_IOPTE_SO_RW | CBE_IOPTE_M);525526if (result) {527pr_debug("%s:%d: ps3_dma_map failed (%d)\n",528__func__, __LINE__, result);529BUG_ON("check region type");530goto clean_alloc;531}532533return (void*)virt_addr;534535clean_alloc:536free_pages(virt_addr, get_order(size));537clean_none:538dma_handle = NULL;539return NULL;540}541542static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,543dma_addr_t dma_handle, unsigned long attrs)544{545struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);546547ps3_dma_unmap(dev->d_region, dma_handle, size);548free_pages((unsigned long)vaddr, get_order(size));549}550551/* Creates TCEs for a user provided buffer. The user buffer must be552* contiguous real kernel storage (not vmalloc). The address passed here553* comprises a page address and offset into that page. The dma_addr_t554* returned will point to the same byte within the page as was passed in.555*/556557static dma_addr_t ps3_sb_map_page(struct device *_dev, struct page *page,558unsigned long offset, size_t size, enum dma_data_direction direction,559unsigned long attrs)560{561struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);562int result;563dma_addr_t bus_addr;564void *ptr = page_address(page) + offset;565566result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,567&bus_addr,568CBE_IOPTE_PP_R | CBE_IOPTE_PP_W |569CBE_IOPTE_SO_RW | CBE_IOPTE_M);570571if (result) {572pr_debug("%s:%d: ps3_dma_map failed (%d)\n",573__func__, __LINE__, result);574}575576return bus_addr;577}578579static dma_addr_t ps3_ioc0_map_page(struct device *_dev, struct page *page,580unsigned long offset, size_t size,581enum dma_data_direction direction,582unsigned long attrs)583{584struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);585int result;586dma_addr_t bus_addr;587u64 iopte_flag;588void *ptr = page_address(page) + offset;589590iopte_flag = CBE_IOPTE_M;591switch (direction) {592case DMA_BIDIRECTIONAL:593iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;594break;595case DMA_TO_DEVICE:596iopte_flag |= CBE_IOPTE_PP_R | CBE_IOPTE_SO_R;597break;598case DMA_FROM_DEVICE:599iopte_flag |= CBE_IOPTE_PP_W | CBE_IOPTE_SO_RW;600break;601default:602/* not happened */603BUG();604}605result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,606&bus_addr, iopte_flag);607608if (result) {609pr_debug("%s:%d: ps3_dma_map failed (%d)\n",610__func__, __LINE__, result);611}612return bus_addr;613}614615static void ps3_unmap_page(struct device *_dev, dma_addr_t dma_addr,616size_t size, enum dma_data_direction direction, unsigned long attrs)617{618struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);619int result;620621result = ps3_dma_unmap(dev->d_region, dma_addr, size);622623if (result) {624pr_debug("%s:%d: ps3_dma_unmap failed (%d)\n",625__func__, __LINE__, result);626}627}628629static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl,630int nents, enum dma_data_direction direction, unsigned long attrs)631{632#if defined(CONFIG_PS3_DYNAMIC_DMA)633BUG_ON("do");634return -EPERM;635#else636struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);637struct scatterlist *sg;638int i;639640for_each_sg(sgl, sg, nents, i) {641int result = ps3_dma_map(dev->d_region, sg_phys(sg),642sg->length, &sg->dma_address, 0);643644if (result) {645pr_debug("%s:%d: ps3_dma_map failed (%d)\n",646__func__, __LINE__, result);647return -EINVAL;648}649650sg->dma_length = sg->length;651}652653return nents;654#endif655}656657static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg,658int nents,659enum dma_data_direction direction,660unsigned long attrs)661{662BUG();663return -EINVAL;664}665666static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,667int nents, enum dma_data_direction direction, unsigned long attrs)668{669#if defined(CONFIG_PS3_DYNAMIC_DMA)670BUG_ON("do");671#endif672}673674static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,675int nents, enum dma_data_direction direction,676unsigned long attrs)677{678BUG();679}680681static int ps3_dma_supported(struct device *_dev, u64 mask)682{683return mask >= DMA_BIT_MASK(32);684}685686static const struct dma_map_ops ps3_sb_dma_ops = {687.alloc = ps3_alloc_coherent,688.free = ps3_free_coherent,689.map_sg = ps3_sb_map_sg,690.unmap_sg = ps3_sb_unmap_sg,691.dma_supported = ps3_dma_supported,692.map_page = ps3_sb_map_page,693.unmap_page = ps3_unmap_page,694.mmap = dma_common_mmap,695.get_sgtable = dma_common_get_sgtable,696.alloc_pages_op = dma_common_alloc_pages,697.free_pages = dma_common_free_pages,698};699700static const struct dma_map_ops ps3_ioc0_dma_ops = {701.alloc = ps3_alloc_coherent,702.free = ps3_free_coherent,703.map_sg = ps3_ioc0_map_sg,704.unmap_sg = ps3_ioc0_unmap_sg,705.dma_supported = ps3_dma_supported,706.map_page = ps3_ioc0_map_page,707.unmap_page = ps3_unmap_page,708.mmap = dma_common_mmap,709.get_sgtable = dma_common_get_sgtable,710.alloc_pages_op = dma_common_alloc_pages,711.free_pages = dma_common_free_pages,712};713714/**715* ps3_system_bus_release_device - remove a device from the system bus716*/717718static void ps3_system_bus_release_device(struct device *_dev)719{720struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);721kfree(dev);722}723724/**725* ps3_system_bus_device_register - add a device to the system bus726*727* ps3_system_bus_device_register() expects the dev object to be allocated728* dynamically by the caller. The system bus takes ownership of the dev729* object and frees the object in ps3_system_bus_release_device().730*/731732int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)733{734int result;735static unsigned int dev_ioc0_count;736static unsigned int dev_sb_count;737static unsigned int dev_vuart_count;738static unsigned int dev_lpm_count;739740if (!dev->core.parent)741dev->core.parent = &ps3_system_bus;742dev->core.bus = &ps3_system_bus_type;743dev->core.release = ps3_system_bus_release_device;744745switch (dev->dev_type) {746case PS3_DEVICE_TYPE_IOC0:747dev->core.dma_ops = &ps3_ioc0_dma_ops;748dev_set_name(&dev->core, "ioc0_%02x", ++dev_ioc0_count);749break;750case PS3_DEVICE_TYPE_SB:751dev->core.dma_ops = &ps3_sb_dma_ops;752dev_set_name(&dev->core, "sb_%02x", ++dev_sb_count);753754break;755case PS3_DEVICE_TYPE_VUART:756dev_set_name(&dev->core, "vuart_%02x", ++dev_vuart_count);757break;758case PS3_DEVICE_TYPE_LPM:759dev_set_name(&dev->core, "lpm_%02x", ++dev_lpm_count);760break;761default:762BUG();763}764765dev->core.of_node = NULL;766set_dev_node(&dev->core, 0);767768pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core));769770result = device_register(&dev->core);771return result;772}773774EXPORT_SYMBOL_GPL(ps3_system_bus_device_register);775776int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv)777{778int result;779780pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);781782if (!firmware_has_feature(FW_FEATURE_PS3_LV1))783return -ENODEV;784785drv->core.bus = &ps3_system_bus_type;786787result = driver_register(&drv->core);788pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);789return result;790}791792EXPORT_SYMBOL_GPL(ps3_system_bus_driver_register);793794void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv)795{796pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name);797driver_unregister(&drv->core);798pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name);799}800801EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister);802803804