aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/omap-sham.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index f73b1e0fa5e8..a6eb6a8bbb61 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1718,6 +1718,46 @@ static const struct omap_sham_pdata omap_sham_pdata_omap4 = {
1718 .minor_shift = 0, 1718 .minor_shift = 0,
1719}; 1719};
1720 1720
1721static struct omap_sham_algs_info omap_sham_algs_info_omap5[] = {
1722 {
1723 .algs_list = algs_sha1_md5,
1724 .size = ARRAY_SIZE(algs_sha1_md5),
1725 },
1726 {
1727 .algs_list = algs_sha224_sha256,
1728 .size = ARRAY_SIZE(algs_sha224_sha256),
1729 },
1730 {
1731 .algs_list = algs_sha384_sha512,
1732 .size = ARRAY_SIZE(algs_sha384_sha512),
1733 },
1734};
1735
1736static const struct omap_sham_pdata omap_sham_pdata_omap5 = {
1737 .algs_info = omap_sham_algs_info_omap5,
1738 .algs_info_size = ARRAY_SIZE(omap_sham_algs_info_omap5),
1739 .flags = BIT(FLAGS_AUTO_XOR),
1740 .digest_size = SHA512_DIGEST_SIZE,
1741 .copy_hash = omap_sham_copy_hash_omap4,
1742 .write_ctrl = omap_sham_write_ctrl_omap4,
1743 .trigger = omap_sham_trigger_omap4,
1744 .poll_irq = omap_sham_poll_irq_omap4,
1745 .intr_hdlr = omap_sham_irq_omap4,
1746 .idigest_ofs = 0x240,
1747 .odigest_ofs = 0x200,
1748 .din_ofs = 0x080,
1749 .digcnt_ofs = 0x280,
1750 .rev_ofs = 0x100,
1751 .mask_ofs = 0x110,
1752 .sysstatus_ofs = 0x114,
1753 .mode_ofs = 0x284,
1754 .length_ofs = 0x288,
1755 .major_mask = 0x0700,
1756 .major_shift = 8,
1757 .minor_mask = 0x003f,
1758 .minor_shift = 0,
1759};
1760
1721static const struct of_device_id omap_sham_of_match[] = { 1761static const struct of_device_id omap_sham_of_match[] = {
1722 { 1762 {
1723 .compatible = "ti,omap2-sham", 1763 .compatible = "ti,omap2-sham",
@@ -1727,6 +1767,10 @@ static const struct of_device_id omap_sham_of_match[] = {
1727 .compatible = "ti,omap4-sham", 1767 .compatible = "ti,omap4-sham",
1728 .data = &omap_sham_pdata_omap4, 1768 .data = &omap_sham_pdata_omap4,
1729 }, 1769 },
1770 {
1771 .compatible = "ti,omap5-sham",
1772 .data = &omap_sham_pdata_omap5,
1773 },
1730 {}, 1774 {},
1731}; 1775};
1732MODULE_DEVICE_TABLE(of, omap_sham_of_match); 1776MODULE_DEVICE_TABLE(of, omap_sham_of_match);