From: Gary King Date: Thu, 16 Sep 2010 20:28:51 +0000 (-0700) Subject: video: tegra: move nvhost.h to mach-tegra/include/nvhost.h X-Git-Tag: firefly_0821_release~9833^2~163^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=93fa4f2a2df9f536f12b929fbe916c72c5422cf1;p=firefly-linux-kernel-4.4.55.git video: tegra: move nvhost.h to mach-tegra/include/nvhost.h Change-Id: I3bcc0a91cb379c0bd6ef382a5bf10e2406e55697 Signed-off-by: Gary King --- diff --git a/arch/arm/mach-tegra/include/mach/nvhost.h b/arch/arm/mach-tegra/include/mach/nvhost.h new file mode 100644 index 000000000000..c7db9d2ec30b --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/nvhost.h @@ -0,0 +1,69 @@ +/* + * include/linux/nvhost.h + * + * Tegra graphics host driver + * + * Copyright (c) 2009-2010, NVIDIA Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __LINUX_NVHOST_H +#define __LINUX_NVHOST_H + +#include + +struct nvhost_master; + +struct nvhost_device { + const char *name; + struct device dev; + int id; + u32 num_resources; + struct resource *resource; + + struct nvhost_master *host; +}; + +extern int nvhost_device_register(struct nvhost_device *); +extern void nvhost_device_unregister(struct nvhost_device *); + +extern struct bus_type nvhost_bus_type; + +struct nvhost_driver { + int (*probe)(struct nvhost_device *); + int (*remove)(struct nvhost_device *); + void (*shutdown)(struct nvhost_device *); + int (*suspend)(struct nvhost_device *, pm_message_t state); + int (*resume)(struct nvhost_device *); + struct device_driver driver; +}; + +extern int nvhost_driver_register(struct nvhost_driver *); +extern void nvhost_driver_unregister(struct nvhost_driver *); +extern struct resource *nvhost_get_resource(struct nvhost_device *, unsigned int, unsigned int); +extern int nvhost_get_irq(struct nvhost_device *, unsigned int); +extern struct resource *nvhost_get_resource_byname(struct nvhost_device *, unsigned int, const char *); +extern int nvhost_get_irq_byname(struct nvhost_device *, const char *); + +#define to_nvhost_device(x) container_of((x), struct nvhost_device, dev) +#define to_nvhost_driver(drv) (container_of((drv), struct nvhost_driver, \ + driver)) + +#define nvhost_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) +#define nvhost_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) + +int nvhost_bus_register(struct nvhost_master *host); +#endif diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index ef333f6474af..55ecf100de05 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #include "dc_reg.h" #include "dc_priv.h" diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index cfd41e8950da..3487e54c74cf 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -22,13 +22,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include "dc_reg.h" #include "dc_priv.h" diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 45d47e6c991a..ac07c551fb5d 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -24,12 +24,12 @@ #include #include #include -#include #include #include #include +#include struct tegra_fb_info { struct tegra_dc_win *win; diff --git a/drivers/video/tegra/host/bus.c b/drivers/video/tegra/host/bus.c index b8caf337ede4..a633950aeaff 100644 --- a/drivers/video/tegra/host/bus.c +++ b/drivers/video/tegra/host/bus.c @@ -20,7 +20,8 @@ */ #include -#include + +#include #include "dev.h" diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c index 2102f1b545fd..4d2d3c50fc3f 100644 --- a/drivers/video/tegra/host/dev.c +++ b/drivers/video/tegra/host/dev.c @@ -22,7 +22,6 @@ #include "dev.h" -#include #include #include #include @@ -31,10 +30,11 @@ #include #include #include -#include #include +#include + #define DRIVER_NAME "tegra_grhost" #define IFACE_NAME "nvhost" diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h deleted file mode 100644 index c7db9d2ec30b..000000000000 --- a/include/linux/nvhost.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * include/linux/nvhost.h - * - * Tegra graphics host driver - * - * Copyright (c) 2009-2010, NVIDIA Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __LINUX_NVHOST_H -#define __LINUX_NVHOST_H - -#include - -struct nvhost_master; - -struct nvhost_device { - const char *name; - struct device dev; - int id; - u32 num_resources; - struct resource *resource; - - struct nvhost_master *host; -}; - -extern int nvhost_device_register(struct nvhost_device *); -extern void nvhost_device_unregister(struct nvhost_device *); - -extern struct bus_type nvhost_bus_type; - -struct nvhost_driver { - int (*probe)(struct nvhost_device *); - int (*remove)(struct nvhost_device *); - void (*shutdown)(struct nvhost_device *); - int (*suspend)(struct nvhost_device *, pm_message_t state); - int (*resume)(struct nvhost_device *); - struct device_driver driver; -}; - -extern int nvhost_driver_register(struct nvhost_driver *); -extern void nvhost_driver_unregister(struct nvhost_driver *); -extern struct resource *nvhost_get_resource(struct nvhost_device *, unsigned int, unsigned int); -extern int nvhost_get_irq(struct nvhost_device *, unsigned int); -extern struct resource *nvhost_get_resource_byname(struct nvhost_device *, unsigned int, const char *); -extern int nvhost_get_irq_byname(struct nvhost_device *, const char *); - -#define to_nvhost_device(x) container_of((x), struct nvhost_device, dev) -#define to_nvhost_driver(drv) (container_of((drv), struct nvhost_driver, \ - driver)) - -#define nvhost_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) -#define nvhost_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) - -int nvhost_bus_register(struct nvhost_master *host); -#endif