spi-brcmstb-qspi.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright 2016 Broadcom
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License, version 2, as
  6. * published by the Free Software Foundation (the "GPL").
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License version 2 (GPLv2) for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * version 2 (GPLv2) along with this source code.
  15. */
  16. #include <linux/device.h>
  17. #include <linux/module.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/of.h>
  20. #include "spi-bcm-qspi.h"
  21. static const struct of_device_id brcmstb_qspi_of_match[] = {
  22. { .compatible = "brcm,spi-brcmstb-qspi" },
  23. { .compatible = "brcm,spi-brcmstb-mspi" },
  24. {},
  25. };
  26. MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
  27. static int brcmstb_qspi_probe(struct platform_device *pdev)
  28. {
  29. return bcm_qspi_probe(pdev, NULL);
  30. }
  31. static int brcmstb_qspi_remove(struct platform_device *pdev)
  32. {
  33. return bcm_qspi_remove(pdev);
  34. }
  35. static struct platform_driver brcmstb_qspi_driver = {
  36. .probe = brcmstb_qspi_probe,
  37. .remove = brcmstb_qspi_remove,
  38. .driver = {
  39. .name = "brcmstb_qspi",
  40. .pm = &bcm_qspi_pm_ops,
  41. .of_match_table = brcmstb_qspi_of_match,
  42. }
  43. };
  44. module_platform_driver(brcmstb_qspi_driver);
  45. MODULE_LICENSE("GPL v2");
  46. MODULE_AUTHOR("Kamal Dasu");
  47. MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");